Created
July 4, 2020 10:37
-
-
Save rs-ds/382240c4ce61b53e0a354a76bdd2bb50 to your computer and use it in GitHub Desktop.
Traefik
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' | |
volumes: | |
traefik_acme: {} | |
services: | |
traefik: | |
env_file: .env | |
build: traefik | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- traefik_acme:/etc/traefik/acme/ # Defined in traefik/traefik.toml | |
ports: | |
- 0.0.0.0:80:80 | |
- 0.0.0.0:443:443 |
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
FROM traefik:alpine | |
RUN mkdir -p /etc/traefik/acme | |
RUN touch /etc/traefik/acme/acme.json | |
RUN chmod 600 /etc/traefik/acme/acme.json | |
COPY traefik.toml /etc/traefik | |
# Custom SSL Certificate | |
# COPY /path/to/ssl.crt /certs/ssl.crt | |
# COPY /path/to/ssl.key /certs/ssl.key |
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
logLevel = "INFO" | |
defaultEntryPoints = ["https", "http"] | |
[retry] | |
[docker] | |
exposedByDefault = false | |
[Global] | |
debug = true | |
[log] | |
level = "DEBUG" | |
[accessLog] | |
# format = "json" | |
[api] | |
# entryPoint = "traefik" | |
# rule = "Host(`traefik.domain.com`)" | |
dashboard = false | |
[ping] | |
# Entrypoints, http and https | |
[entryPoints] | |
# http should be redirected to https | |
[entryPoints.http] | |
address = ":80" | |
[entryPoints.http.redirect] | |
entryPoint = "https" | |
# https is the default | |
[entryPoints.https] | |
address = ":443" | |
[entryPoints.https.tls] | |
# Custom SSL certificate | |
# [[entryPoints.https.tls.certificates]] | |
# certFile = "/certs/ssl.crt" | |
# keyFile = "/certs/ssl.key" | |
[acme] | |
email = "dhilip@reckonsys.com" | |
storage = "/etc/traefik/acme/acme.json" | |
entryPoint = "https" | |
acmeLogging = true | |
onHostRule = true | |
# caServer = "https://acme-staging-v02.api.letsencrypt.org/directory" | |
# Default: "https://acme-v02.api.letsencrypt.org/directory" | |
[acme.dnsChallenge] | |
provider = "route53" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment