Skip to content

Instantly share code, notes, and snippets.

@hrshadhin
Created March 31, 2018 06:43
Show Gist options
  • Save hrshadhin/033cdc15fb3df1984b0ad68ea284074a to your computer and use it in GitHub Desktop.
Save hrshadhin/033cdc15fb3df1984b0ad68ea284074a to your computer and use it in GitHub Desktop.
version: '3'
services:
awesome:
image: awesome
ports:
- 8080
environment:
- SERVICE_PORTS=8080
deploy:
replicas: 20
update_config:
parallelism: 5
delay: 10s
restart_policy:
condition: on-failure
max_attempts: 3
window: 120s
networks:
- web
proxy:
image: dockercloud/haproxy
depends_on:
- awesome
environment:
- BALANCE=leastconn
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 80:80
networks:
- web
deploy:
placement:
constraints: [node.role == manager]
networks:
web:
driver: overlay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment