compose-file: fix constraint examples, and consistent format

Constraints don't accept spaces around `==` / `!=`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-03-17 14:14:16 +01:00
parent f15a3a1c4b
commit 02a36c2735
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 8 additions and 5 deletions

View File

@ -60,7 +60,8 @@ services:
- backend
deploy:
placement:
constraints: [node.role == manager]
constraints:
- "node.role==manager"
vote:
image: dockersamples/examplevotingapp_vote:before
@ -108,7 +109,8 @@ services:
max_attempts: 3
window: 120s
placement:
constraints: [node.role == manager]
constraints:
- "node.role==manager"
visualizer:
image: dockersamples/visualizer:stable
@ -119,7 +121,8 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
constraints:
- "node.role==manager"
networks:
frontend:
@ -772,8 +775,8 @@ services:
deploy:
placement:
constraints:
- node.role == manager
- engine.labels.operatingsystem == ubuntu 14.04
- "node.role==manager"
- "engine.labels.operatingsystem==ubuntu 18.04"
preferences:
- spread: node.labels.zone
```