Skip to content

Instantly share code, notes, and snippets.

@barankaynak
Created April 22, 2019 11:07
Show Gist options
  • Save barankaynak/0bdfb13a15640a24c6b078fcba70eb21 to your computer and use it in GitHub Desktop.
Save barankaynak/0bdfb13a15640a24c6b078fcba70eb21 to your computer and use it in GitHub Desktop.
Traefik example
version: "3"
services:
traefik:
image: traefik:alpine
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- $PWD/config:/etc/traefik
- /var/run/docker.sock:/var/run/docker.sock
debug=true
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.traefik]
address = ":8080"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
entryPoint = "https"
email = "[email protected]"
storage = "/etc/traefik/acme/acme.json"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = ""
exposedByDefault = false
[api]
# Name of the related entry point
#
# Optional
# Default: "traefik"
#
entryPoint = "traefik"
# Enable Dashboard
#
# Optional
# Default: true
#
dashboard = true
# Enable debug mode.
# This will install HTTP handlers to expose Go expvars under /debug/vars and
# pprof profiling data under /debug/pprof/.
# Additionally, the log level will be set to DEBUG.
#
# Optional
# Default: false
#
debug = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment