Skip to content

Instantly share code, notes, and snippets.

@agp8x
Created July 19, 2018 18:55
Show Gist options
  • Save agp8x/5d180b7eb665b69809eadf5a7d5ce16b to your computer and use it in GitHub Desktop.
Save agp8x/5d180b7eb665b69809eadf5a7d5ce16b to your computer and use it in GitHub Desktop.
version: '3'
services:
traefik:
image: traefik:1.6
command: --api --docker --docker.exposedbydefault=false
volumes:
- ./traefik.toml:/traefik.toml
- ./acme.json:/acme.json
- /var/run/docker.sock:/var/run/docker.sock
restart: on-failure:5
ports:
- 80:80
- 443:443
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.port=8080"
- "traefik.frontend.rule=Host:traefik.clkl.de"
- "traefik.frontend.headers.SSLRedirect=true"
networks:
proxy:
driver: bridge
logLevel = "ERROR"
defaultEntryPoints = ["https", "http"]
[entryPoints]
[entryPoints.http]
address = ":80"
# [entryPoints.http.redirect]
# entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[docker]
exposedbydefault = false
watch = true
[acme]
email = "tls-admin@agp8x.org"
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