Skip to content

Instantly share code, notes, and snippets.

@emj365
Last active June 24, 2018 10:17
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 emj365/732ffb99b171ed181930a240c49ad524 to your computer and use it in GitHub Desktop.
Save emj365/732ffb99b171ed181930a240c49ad524 to your computer and use it in GitHub Desktop.
example startup traefik on swarm
docker-machine ssh do-swarm0 "docker service create \
--name traefik \
--constraint=node.role==manager \
--publish 80:80 \
--publish 443:443 \
--publish 8080:8080 \
--publish 19000:19000 \
--publish 19001:19001 \
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
--network traefik-net \
traefik \
--entryPoints='Name:http Address::80' \
--entryPoints='Name:https Address::443' \
--entryPoints='Name:expo Address::19000' \
--entryPoints='Name:expo-assets Address::19001' \
--docker \
--docker.swarmMode \
--docker.domain=traefik \
--docker.watch \
--api"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment