Allow blocks prefixed with `x-` in the configuration as a place to declare reusable blocks with YAML anchors and aliases. Borrowed from the Docker Compose configuration file format - https://github.com/compose-spec/compose-spec/blob/main/spec.md#extension Thanks to @ruyrocha for the suggestion.
25 lines
339 B
YAML
25 lines
339 B
YAML
|
|
x-web: &web
|
|
traefik: true
|
|
|
|
service: app
|
|
image: dhh/app
|
|
servers:
|
|
web_chicago:
|
|
<<: *web
|
|
hosts:
|
|
- 1.1.1.1
|
|
- 1.1.1.2
|
|
web_tokyo:
|
|
<<: *web
|
|
hosts:
|
|
- 1.1.1.3
|
|
- 1.1.1.4
|
|
env:
|
|
REDIS_URL: redis://x/y
|
|
registry:
|
|
server: registry.digitalocean.com
|
|
username: user
|
|
password: pw
|
|
primary_role: web_tokyo
|