Skip to content

Instantly share code, notes, and snippets.

@muresan
Last active June 13, 2018 13:29
Show Gist options
  • Select an option

  • Save muresan/d663ab95266c124aad6cdd11ea173fed to your computer and use it in GitHub Desktop.

Select an option

Save muresan/d663ab95266c124aad6cdd11ea173fed to your computer and use it in GitHub Desktop.
docker network create -d overlay --subnet 10.10.10.0/24 consul-swarm
docker service create --network consul-swarm --name consul --mode=global -e CONSUL_BIND_INTERFACE=eth0 -e CONSUL_CLIENT_INTERFACE=eth0 -p 8500:8500 consul agent -server -bootstrap-expect=2 -retry-join=tasks.consul -ui -client=0.0.0.0
docker service create --network consul-swarm --name registrator --mode=global --mount type=bind,source=/var/run/docker.sock,destination=/tmp/docker.sock gliderlabs/registrator consul://consul:8500
docker service create --name traefik --constraint node.role==manager --publish 80:80 --publish 8080:8080 --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock --network hw_replica traefik --docker --docker.swarmmode --docker.domain=traefik --docker.watch --web
@muresan
Copy link
Copy Markdown
Author

muresan commented Nov 18, 2016

Changed to -retry-join=tasks.consul and removed dnsrr after finding out that this name actually exists in swarm DNS. I've not seen it anyplace documented.

@holms
Copy link
Copy Markdown

holms commented Jun 13, 2018

Are you using consul for traefik in here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment