-
-
Save danielnaranjo/d45e6606e422d3601972858fd2ad1be6 to your computer and use it in GitHub Desktop.
traefik.io nginx example
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: '2' | |
services: | |
nginx: | |
image: nginx:alpine | |
restart: always | |
labels: | |
- "traefik.enable=true" | |
- 'traefik.frontend.rule=Host:www.website.com' | |
- "traefik.port=80" | |
volumes: | |
- ./website:/usr/share/nginx/html | |
proxy: | |
image: traefik | |
command: --web -c /etc/traefik/traefik.toml --LOGLEVEL=debug | |
restart: always | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- ./traefik.toml:/etc/traefik/traefik.toml | |
- /acme |
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
InsecureSkipVerify = true | |
defaultEntryPoints = ["https", "http"] | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
[entryPoints.http.redirect] | |
entryPoint = "https" | |
[entryPoints.https] | |
address = ":443" | |
compress = true | |
[entryPoints.https.tls] | |
[acme] | |
email = "your@email.com" | |
storage = "/acme/acme.json" | |
entryPoint = "https" | |
OnHostRule = true | |
[acme.httpChallenge] | |
entryPoint = "http" | |
[docker] | |
endpoint = "unix:///var/run/docker.sock" | |
domain = "docker.localhost" | |
exposedbydefault = false | |
watch = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment