Skip to content

Instantly share code, notes, and snippets.

@robherley
Created September 23, 2018 03:36
Show Gist options
  • Save robherley/bea9b666a76ef5de12e994dc11953d47 to your computer and use it in GitHub Desktop.
Save robherley/bea9b666a76ef5de12e994dc11953d47 to your computer and use it in GitHub Desktop.
traefik config
version: '3'
services:
traefik:
image: traefik
container_name: traefik
networks:
- traefik_proxy
ports:
- "80:80"
- "443:443"
labels:
traefik.enable: "true"
traefik.backend: "traefik"
traefik.frontend.rule: "Host:traefik.robherley.xyz"
traefik.port: "8080"
traefik.frontend.auth.basic: ${HTTP_AUTH}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOME}/docker/traefik/traefik.toml:/traefik.toml
- ${HOME}/docker/traefik/acme.json:/acme.json
- ${HOME}/docker/traefik/logs/traefik.log:/traefik.log
- ${HOME}/docker/traefik/logs/access.log:/access.log
environment:
- DO_AUTH_TOKEN
restart: always
networks:
traefik_proxy:
external:
name: traefik_proxy
debug = false
logLevel = "DEBUG"
defaultEntryPoints = ["https","http"]
[api]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[retry]
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "robherley.xyz"
watch = true
exposedByDefault = true
[acme]
email = "[email protected]"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
[acme.dnsChallenge]
provider = "digitalocean"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment