Last active
November 2, 2020 11:39
-
-
Save oleg-brizy/414998474bd028e8a2c4665e735fd14e to your computer and use it in GitHub Desktop.
Traefik in docker-compose
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
{} |
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' | |
services: | |
traefik: | |
image: traefik:1.7.26-alpine | |
restart: unless-stopped | |
ports: | |
- 80:80 | |
- 443:443 | |
networks: | |
- traefik | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- ./traefik.toml:/traefik.toml | |
- ./acme.json:/acme.json | |
container_name: traefik | |
networks: | |
traefik: | |
external: true |
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
debug = false | |
logLevel = "ERROR" | |
defaultEntryPoints = ["https","http"] | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
[entryPoints.http.redirect] | |
entryPoint = "https" | |
[entryPoints.https] | |
address = ":443" | |
[entryPoints.https.tls] | |
[entryPoints.https.redirect] | |
regex = "^https://www.(.*)" | |
replacement = "https://$1" | |
permanent = true | |
[retry] | |
[docker] | |
endpoint = "unix:///var/run/docker.sock" | |
watch = true | |
exposedByDefault = false | |
network = "traefik" | |
[acme] | |
email = "[email protected]" | |
storage = "acme.json" | |
entryPoint = "https" | |
onHostRule = true | |
[acme.httpChallenge] | |
entryPoint = "http" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment