1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
version: '3.5' services: foo: image: alpine:3.10.1 command: /bin/true deploy: replicas: 3 restart_policy: condition: any max_attempts: 7 resources: limits: memory: 300M cpus: '0.7' reservations: memory: 100M volumes: - foo:/bar networks: - bar volumes: foo: driver: default networks: bar: attachable: true