Created
January 17, 2018 22:58
-
-
Save djmaze/2684fbf147d775c8ee441b4302554823 to your computer and use it in GitHub Desktop.
Traefik loadbalancer running on Docker swarm (w/ Let's Encrypt)
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
version: "3.3" | |
services: | |
traefik: | |
image: traefik:1.5.0-rc5 | |
command: | |
- --docker | |
- --docker.swarmmode | |
- --docker.watch | |
- --web | |
- --web.readonly | |
- --defaultEntrypoints=https | |
- --defaultEntrypoints=http | |
- --entryPoints=Name:http Address::80 Redirect.EntryPoint:https | |
- --entryPoints=Name:https Address::443 TLS | |
- --acme | |
- --acme.onhostrule | |
- --acme.entrypoint=https | |
- --acme.storage=/srv/traefik/acme.json | |
- --acme.httpChallenge.entryPoint=http | |
- --debug | |
volumes: | |
- data:/srv/traefik | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
ports: | |
- 80:80/tcp | |
- 443:443/tcp | |
networks: | |
- traefik | |
deploy: | |
placement: | |
constraints: | |
- node.labels.traefik == 1 | |
- node.role == manager | |
volumes: | |
data: | |
networks: | |
traefik: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment