Daemon/host/role accessories

Allow the hosts for accessories to be specified by host or role, or on
all app hosts by setting `daemon: true`.

```
  # Single host
  mysql:
    host: 1.1.1.1
  # Multiple hosts
  redis:
    hosts:
      - 1.1.1.1
      - 1.1.1.2
  # By role
  monitoring:
    roles:
      - web
      - jobs
```
This commit is contained in:
Donal McBreen
2023-03-28 13:05:09 +01:00
parent cec82ac641
commit c06585fef4
10 changed files with 165 additions and 56 deletions

8
test/fixtures/deploy_simple.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
service: app
image: dhh/app
servers:
- "1.1.1.1"
- "1.1.1.2"
registry:
username: user
password: pw

View File

@@ -1,8 +1,12 @@
service: app
image: dhh/app
servers:
- 1.1.1.1
- 1.1.1.2
web:
- "1.1.1.1"
- "1.1.1.2"
workers:
- "1.1.1.3"
- "1.1.1.4"
registry:
username: user
password: pw
@@ -23,7 +27,8 @@ accessories:
- data:/var/lib/mysql
redis:
image: redis:latest
host: 1.1.1.4
roles:
- web
port: 6379
directories:
- data:/data