Skip to content

Instantly share code, notes, and snippets.

@mraerino
Created February 12, 2018 21:43
Show Gist options
  • Save mraerino/83fc517bb9114bfe3246095c20b37fd6 to your computer and use it in GitHub Desktop.
Save mraerino/83fc517bb9114bfe3246095c20b37fd6 to your computer and use it in GitHub Desktop.
defaultEntryPoints = ["https", "http"]
################################################################
# Web configuration backend
################################################################
[web]
address = ":8080"
################################################################
# Docker configuration backend
################################################################
[docker]
domain = "example.com"
exposedbydefault = false
watch = true
# Entrypoints, http and https
[entryPoints]
# http should be redirected to https
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
# https is the default
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
# Enable ACME (Let's Encrypt): automatic SSL
[acme]
# Email address used for registration
email = "admin@example.com"
storage = "/etc/traefik/acme/acme.json"
entryPoint = "https"
onDemand = false
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment