Skip to content

Instantly share code, notes, and snippets.

@danieldaeschle
Last active May 3, 2019 11:32
Show Gist options
  • Save danieldaeschle/02a7243eb82d8cc96ab60c90df25373d to your computer and use it in GitHub Desktop.
Save danieldaeschle/02a7243eb82d8cc96ab60c90df25373d to your computer and use it in GitHub Desktop.
Traefik
version: "3"
services:
helloworld:
image: tutum/hello-world
expose:
- "80"
labels:
- "traefik.domain=helloworld.example.com"
version: "3"
services:
reverse-proxy:
image: traefik:alpine
command: --logLevel="DEBUG"
network_mode: host
volumes:
- $PWD/traefik.toml:/etc/traefik/traefik.toml
- $PWD/acme.json:/etc/traefik/acme/acme.json
- /var/run/docker.sock:/var/run/docker.sock
defaultEntryPoints = ["https", "http"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[entryPoints.dashboard]
address = ":8080"
[entryPoints.dashboard.auth]
[entryPoints.dashboard.auth.basic]
users = ["basicauthusernameandpassword"]
[acme]
email = "daniel.daeschle@gmail.com"
entryPoint = "https"
storage = "/etc/traefik/acme/acme.json"
onHostRule = true
[acme.tlsChallenge]
[docker]
endpoint = "unix:///var/run/docker.sock"
watch = true
[api]
entrypoint = "dashboard"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment