Last active
May 29, 2020 09:17
-
-
Save thomasxd24/bbb138962263013f2d9729f0dc35ef4c to your computer and use it in GitHub Desktop.
Traefik Stack yml
This file contains 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" | |
networks: | |
traefik: | |
external: true | |
services: | |
traefik: | |
image: "traefik:v2.2" | |
networks: | |
- traefik | |
command: | |
- "--log.level=DEBUG" | |
- "--api.insecure=true" | |
- "--providers.docker=true" | |
- "--providers.docker.exposedbydefault=false" | |
- "--entrypoints.web.address=:80" | |
ports: | |
- "80:80" | |
- "8080:8080" | |
volumes: | |
- "/var/run/docker.sock:/var/run/docker.sock:ro" |
This file contains 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" | |
networks: | |
traefik: | |
external: true | |
services: | |
whoami: | |
image: "containous/whoami" | |
networks: | |
- traefik | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.whoami.rule=Host(`whoami.thomasxd24.com`)" | |
- "traefik.http.routers.whoami.entrypoints=web" |
This file contains 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:v2.2 | |
restart: always | |
ports: | |
- "80:80" | |
- "8080:8080" # traefik dashboard | |
- "443:443" | |
command: | |
- --api=true | |
- --api.insecure=true # set to 'false' on production | |
- --api.dashboard=true # see https://docs.traefik.io/v2.0/operations/dashboard/#secure-mode for how to secure the dashboard | |
- --api.debug=true # enable additional endpoints for debugging and profiling | |
- --log.level=DEBUG # debug while we get it working, for more levels/info see https://docs.traefik.io/observability/logs/ | |
- --accesslog=true | |
- --log.filePath=/var/traefik/traefik.log | |
- --providers.docker=true | |
- --providers.docker.endpoint=tcp://127.0.0.1:2375 | |
- --providers.docker.swarmMode=true | |
- --providers.docker.exposedbydefault=false | |
- --providers.docker.network=proxy | |
- --entrypoints.web.address=:80 | |
- --entrypoints.web-secured.address=:443 | |
- --certificatesresolvers.mytlschallenge.acme.httpChallenge.entrypoint=web | |
- --certificatesresolvers.mytlschallenge.acme.email=contact@pangolin.network | |
- --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json | |
volumes: | |
- letsencrypt:/letsencrypt | |
- /var/run/docker.sock:/var/run/docker.sock | |
networks: | |
- proxy | |
deploy: | |
placement: | |
constraints: | |
- node.role == manager | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.api.rule=Host(`dashboard.srv2.pangolin.network`)" | |
- "traefik.http.routers.api.service=api@internal" # Let the dashboard access the traefik api | |
networks: | |
proxy: | |
external: true | |
volumes: | |
letsencrypt: |
This file contains 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: | |
whoami: | |
image: "containous/whoami" | |
networks: | |
- proxy | |
deploy: | |
labels: | |
- traefik.enable=true | |
- traefik.http.routers.whoami.rule=Host(`whoami.thomasxd24.com`) | |
- traefik.port=80 | |
networks: | |
proxy: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment