Skip to content

Instantly share code, notes, and snippets.

@svnlto
Created July 23, 2015 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save svnlto/5e0d64c0ef0eaecca807 to your computer and use it in GitHub Desktop.
Save svnlto/5e0d64c0ef0eaecca807 to your computer and use it in GitHub Desktop.
consul_master:
image: progrium/consul
ports:
- "53:53/udp"
- "8300:8300"
- "8301:8301"
- "8301:8301/udp"
- "8302:8302"
- "8302:8302/udp"
- "8400:8400"
- "8500:8500"
- "8600:8600/udp"
command: -server -bootstrap -ui-dir /ui
test:
image: busybox
command: nslookup redis.service.consul
net: host
dns:
- 192.168.99.100
consul:
hostname: consul
name: consul
extends:
file: consul-service.yml
service: consul_master
registrator:
extends:
file: registrator-service.yml
service: registrator
links:
- consul:consul
redis:
image: redis
ports:
- "10000:6379"
environment:
- "SERVICE_NAME=redis"
- "SERVICE_TAGS=master,backups"
- "SERVICE_REGION=eu1"
registrator:
image: progrium/registrator
command: consul://consul:8500 --ttl 500
volumes:
- /var/run/docker.sock:/tmp/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment