123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- version: "3"
- services:
- redis:
- image: redis:alpine
- ports:
- - "6379"
- networks:
- - frontend
- deploy:
- replicas: 2
- update_config:
- parallelism: 2
- delay: 10s
- restart_policy:
- condition: on-failure
- db:
- image: postgres:9.4
- volumes:
- - db-data:/var/lib/postgresql/data
- networks:
- - backend
- deploy:
- placement:
- constraints: [node.role == manager]
- vote:
- image: dockersamples/examplevotingapp_vote
- ports:
- - 5000:80
- networks:
- - frontend
- depends_on:
- - redis
- deploy:
- replicas: 2
- update_config:
- parallelism: 2
- restart_policy:
- condition: on-failure
- result:
- image: dockersamples/examplevotingapp_result
- ports:
- - 5001:80
- networks:
- - backend
- depends_on:
- - db
- deploy:
- replicas: 2
- update_config:
- parallelism: 2
- delay: 10s
- restart_policy:
- condition: on-failure
- worker:
- image: dockersamples/examplevotingapp_worker
- networks:
- - frontend
- - backend
- deploy:
- mode: replicated
- replicas: 1
- labels: [APP=VOTING]
- restart_policy:
- condition: on-failure
- delay: 10s
- max_attempts: 3
- window: 120s
- visualizer:
- image: manomarks/visualizer
- ports:
- - "8080:8080"
- stop_grace_period: 1m30s
- volumes:
- - "/var/run/docker.sock:/var/run/docker.sock"
- networks:
- frontend:
- backend:
- volumes:
- db-data:
|