Skip to content

Instantly share code, notes, and snippets.

@contato318
Forked from dbones/docker.yaml
Created Jun 22, 2017
Embed
What would you like to do?
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