-
-
Save HelloGrayson/ab0ccb3ecadb6fd18be8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
consul: | |
image: progrium/consul | |
name: consul | |
ports: | |
- "8500:8500" | |
- "53:53/udp" | |
command: -server -bootstrap -ui-dir /ui | |
registrator: | |
image: progrium/registrator | |
command: consul://consul:8500 --ttl 500 | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock | |
links: | |
- consul:consul | |
haproxy: | |
image: haproxy | |
links: | |
- rack1 | |
- rack2 | |
ports: | |
- 6379:6379 | |
- 8888:8888 | |
volumes: | |
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg | |
volumes_from: | |
- consultemplate | |
rack1: | |
name: rack1 | |
image: redis | |
links: | |
- dynamo:dynamo | |
ports: | |
- 6379 | |
environment: | |
- SERVICE_NAME=rack1 | |
rack2: | |
name: rack2 | |
image: redis | |
links: | |
- dynamo:dynamo | |
ports: | |
- 6379 | |
environment: | |
- SERVICE_NAME=rack2 | |
consultemplate: | |
name: consultemplate | |
image: avthart/consul-template | |
command: "consul-template -consul=$CONSUL_PORT_8500_TCP_ADDR:8500 -template /usr/local/etc/haproxy/haproxy.cfg.tmpl:/usr/local/etc/haproxy/haproxy.cfg -log-level=debug" | |
links: | |
- consul:consul | |
volumes: | |
- ./:/usr/local/etc/haproxy/ | |
dynamo: | |
name: dynamo | |
image: redis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment