Skip to content

Instantly share code, notes, and snippets.

@danielloader
Created March 18, 2017 19:38
Show Gist options
  • Save danielloader/2091102e72f147c9b9eef78842bbef73 to your computer and use it in GitHub Desktop.
Save danielloader/2091102e72f147c9b9eef78842bbef73 to your computer and use it in GitHub Desktop.
traefik
version: '2'
services:
proxy:
build: .
restart: always
command: --web --docker --logLevel=DEBUG
networks:
- webgateway
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /data/traefik/acme:/etc/traefik/acme
networks:
webgateway:
driver: bridge
FROM traefik
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
defaultEntryPoints = ["http", "https"]
[web]
address = ":8080"
[web.auth.basic]
users = ["example:$generate_with_htpasswd_tool"]
[docker]
domain = "example.com"
endpoint = "unix:///var/run/docker.sock"
watch = true
[entryPoints]
[entryPoints.http]
address = ":80"
#[entryPoints.http.redirect]
#entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
email = "[email protected]"
storageFile = "/etc/traefik/acme/acme.json"
entryPoint = "https"
onDemand = false
OnHostRule = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment