Skip to content

Instantly share code, notes, and snippets.

@initcron
Created May 3, 2017 07:11
Show Gist options
  • Save initcron/2b21ca5898ca05f1467f6b75bce5f6cc to your computer and use it in GitHub Desktop.
Save initcron/2b21ca5898ca05f1467f6b75bce5f6cc to your computer and use it in GitHub Desktop.
version: "3"
networks:
nw01:
driver: overlay
volumes:
db-data:
services:
vote:
image: schoolofdevops/vote:movies
links:
- redis:redis
ports:
- 80
networks:
- nw01
depends_on:
- redis
deploy:
replicas: 8
update_config:
parallelism: 2
delay: 20s
redis:
image: redis:alpine
networks:
- nw01
worker:
image: schoolofdevops/vote-worker
links:
- redis:redis
networks:
- nw01
depends_on:
- redis
db:
image: postgres:9.4
networks:
- nw01
volumes:
- db-data:/var/lib/postgresql/data
result:
image: schoolofdevops/vote-result
ports:
- 5001:80
networks:
- nw01
depends_on:
- db
deploy:
replicas: 4
update_config:
parallelism: 1
delay: 20s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment