Last active
December 26, 2019 21:53
-
-
Save eloylp/c0350453b37421e165a0a907ba6d1970 to your computer and use it in GitHub Desktop.
Traefik 2.x sample configuration with Lets encrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log: | |
level: INFO | |
entryPoints: | |
web: | |
address: ":80" | |
web-secure: | |
address: ":443" | |
metrics: | |
address: ":9090" | |
http: | |
routers: | |
registry-redir: | |
rule: "Host(`my.domain.com`)" | |
service: registry | |
entryPoints: | |
- "web" | |
middlewares: | |
- "toHttps" | |
registry: | |
rule: "Host(`my.domain.com`)" | |
service: registry | |
entryPoints: | |
- "web-secure" | |
tls: | |
certResolver: le | |
services: | |
registry: | |
loadBalancer: | |
servers: | |
- url: "http://backend:5000/" | |
middlewares: | |
toHttps: | |
redirectScheme: | |
scheme: https | |
permanent: true | |
metrics: | |
prometheus: | |
buckets: | |
- "0.1" | |
- "0.3" | |
- "1.2" | |
- "5.0" | |
addEntryPointsLabels: true | |
addServicesLabels: true | |
entryPoint: metrics | |
providers: | |
file: | |
directory: /etc/traefik | |
watch: true | |
filename: traefik.yml | |
certificatesResolvers: | |
le: | |
acme: | |
email: mail@mail.com | |
storage: /storage/acme.json | |
caServer: "https://acme-v02.api.letsencrypt.org/directory" | |
httpChallenge: | |
entryPoint: web |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment