version: "3"
services:
vote:
image: Example/vote
ports:
- 5000:80
networks:
- my_network1
volumes:
data1:
depends_on:
- redis
deploy:
replicas: 2
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
result:
image: Example/result
ports:
- 5001:80
networks:
- my_network2
volumes:
data2:
depends_on:
- db
deploy:
replicas: 2
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
worker:
image: dockersamples/examplevotingapp_worker
networks:
- my_network1
volumes:
data3:
deploy:
replicas: 1
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
redis:
image: redis:alpine
ports:
- "6379"
networks:
- my_network2
volumes:
data5:
deploy:
replicas: 2
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
db:
image: postgres:9.4
networks:
- my_network2
volumes:
data4:
deploy:
replicas: 2
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
networks:
my_network1:
my_network2:
volumes:
data1:
data2:
data3:
data4:
data5:
  
