version: "3.5" services: web: image: busybox deploy: mode: replicated replicas: 6 labels: [FOO=BAR] update_config: parallelism: 3 delay: 10s failure_action: continue monitor: 60s max_failure_ratio: 0.3 resources: limits: cpus: 0.05 memory: 50M reservations: cpus: 0.01 memory: 20M restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s placement: constraints: - node.hostname==foo - node.role != manager preferences: - spread: node.labels.datacenter healthcheck: test: cat /etc/passwd interval: 10s timeout: 1s retries: 5 volumes: - source: /host/path target: /container/path type: bind read_only: true - source: foobar type: volume target: /container/volumepath - type: volume target: /anonymous - type: volume source: foobar target: /container/volumepath2 volume: nocopy: true stop_grace_period: 20s volumes: foobar: labels: com.docker.compose.test: 'true'