Skip to content

Instantly share code, notes, and snippets.

@toanlc0912
Last active April 24, 2017 07:35
Show Gist options
  • Save toanlc0912/cb70a2942b2942ffdcf2f62ed0253a37 to your computer and use it in GitHub Desktop.
Save toanlc0912/cb70a2942b2942ffdcf2f62ed0253a37 to your computer and use it in GitHub Desktop.
version: "3"
services:
web:
image: vnnvanhuong/friendlyhello:1.0
deploy:
replicas: 10
restart_policy:
condition: on-failure
resources:
limits:
cpus: "0.1"
memory: 50M
ports:
- "80:80"
networks:
- webnet
visualizer:
image: dockersamples/visualizer:stable
ports:
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
networks:
- webnet
redis:
image: redis
ports:
- "6379:6739"
volumes:
- ./data:/data
deploy:
placement:
constraints: [node.role == manager]
networks:
- webnet
networks:
webnet:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment