Created
January 18, 2020 01:49
-
-
Save mazz/ca2e98728b0943532ba40530179c65f6 to your computer and use it in GitHub Desktop.
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.7' | |
services: | |
proxy: | |
image: traefik:v1.7 | |
ports: | |
- 80:80 | |
- 443:443 | |
networks: | |
- proxy-network | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- proxy-certificates-storage:/certificates | |
command: > | |
--docker | |
--docker.watch | |
--docker.exposedbydefault=false | |
--constraints=tag==proxy-public | |
--entrypoints='Name:http Address::80' | |
--entrypoints='Name:https Address::443 TLS' | |
--acme | |
--acme.email=${EMAIL?Variable EMAIL not set} | |
--acme.storage="certificates/acme.json" | |
--acme.entryPoint=https | |
--acme.httpChallenge.entryPoint=http | |
--acme.onhostrule=true | |
--acme.acmelogging=true | |
--logLevel=INFO | |
--accessLog | |
--api | |
labels: | |
- traefik.frontend.rule=Host:proxy.${DOMAIN?Variable DOMAIN not set} | |
- traefik.enable=true | |
- traefik.port=8080 | |
- traefik.tags=proxy-public | |
- traefik.docker.network=proxy-network | |
# Traefik service that listens to HTTP | |
- traefik.redirectorservice.frontend.entryPoints=http | |
- traefik.redirectorservice.frontend.redirect.entryPoint=https | |
# Traefik service that listens to HTTPS | |
- traefik.webservice.frontend.entryPoints=https | |
- traefik.frontend.auth.basic.users=${TKUSERNAME?Variable TKUSERNAME not set}:${HASHED_PASSWORD?Variable HASHED_PASSWORD not set} |
Author
mazz
commented
Jan 18, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment