Skip to content

Instantly share code, notes, and snippets.

@rs-ds

rs-ds/Dockerfile

Created Jul 4, 2020
Embed
What would you like to do?
Traefik
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
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
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
You can’t perform that action at this time.