Skip to content

Instantly share code, notes, and snippets.

@mjhuber
Last active April 30, 2019 07:18
Show Gist options
  • Save mjhuber/b4b278fe9a04b4755f81ebea8c63caac to your computer and use it in GitHub Desktop.
Save mjhuber/b4b278fe9a04b4755f81ebea8c63caac to your computer and use it in GitHub Desktop.
[Traefik LetsEncrypt Example] #docker
version: '2'
services:
proxy:
image: traefik:latest
container_name: proxy
networks:
- frontend
restart: on-failure
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./acme.json:/acme.json
networks:
frontend:
external:
name: frontend
debug = false
checkNewVersion = true
logLevel = "INFO"
defaultEntryPoints = ["https", "http"]
[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 = "huberm.mywire.org"
watch = true
exposedbydefault = false
[acme]
email = "micah.huber@mailbox.org"
storage = "acme.json"
entryPoint = "https"
onDemand = true
onHostRule = true
acmeLogging = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment