Skip to content

Instantly share code, notes, and snippets.

@contato318
Forked from dbones/docker.yaml
Created June 22, 2017 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save contato318/05b39f93695a4eb0db3f5821b81af743 to your computer and use it in GitHub Desktop.
Save contato318/05b39f93695a4eb0db3f5821b81af743 to your computer and use it in GitHub Desktop.
voting app
app-lb:
ports:
- 80:80
labels:
io.rancher.scheduler.affinity:host_label: server=proxy
io.rancher.loadbalancer.target.result: result.app:80=80
io.rancher.loadbalancer.target.vote: vote.app:80=80
tty: true
image: rancher/load-balancer-service
links:
- vote:vote
- result:result
stdin_open: true
result:
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: server=application
tty: true
image: tmadams333/example-voting-app-result
links:
- postgres:db
stdin_open: true
redis:
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: server=stateful
tty: true
image: redis:alpine
stdin_open: true
vote:
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: server=application
tty: true
image: docker/example-voting-app-vote
links:
- redis:redis
stdin_open: true
worker:
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: server=application
tty: true
image: docker/example-voting-app-worker
links:
- postgres:db
- redis:redis
stdin_open: true
postgres:
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: server=stateful
tty: true
image: postgres:9.4
stdin_open: true
app-lb:
scale: 1
load_balancer_config:
haproxy_config: {}
health_check:
port: 42
interval: 2000
unhealthy_threshold: 3
healthy_threshold: 2
response_timeout: 2000
result:
scale: 1
redis:
scale: 1
vote:
scale: 2
worker:
scale: 1
postgres:
scale: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment