traefik/traefik.yml.tmpl
mirsal fc5aa70d27 Allow prometheus metrics collection
This patch adds a METRICS_ENABLED configuration variables which,
when switched on, defines a metrics entrypoint and enables the
built-in prometheus metrics exporter. This allows the monitoring
stack to collect and show traefik metrics
2021-08-09 23:28:15 +00:00

99 lines
2.2 KiB
Cheetah

---
log:
level: {{ env "LOG_LEVEL" }}
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
network: proxy
swarmMode: true
file:
filename: /etc/traefik/file-provider.yml
api:
dashboard: {{ env "DASHBOARD_ENABLED" }}
debug: false
entrypoints:
web:
address: ":80"
http:
redirections:
entryPoint:
to: web-secure
web-secure:
address: ":443"
{{ if eq (env "GITEA_SSH_ENABLED") "1" }}
gitea-ssh:
address: ":2222"
{{ end }}
{{ if eq (env "FOODSOFT_SMTP_ENABLED") "1" }}
foodsoft-smtp:
address: ":2525"
{{ end }}
{{ if eq (env "SMTP_ENABLED") "1" }}
smtp-submission:
address: ":587"
{{ end }}
{{ if eq (env "PEERTUBE_RTMP_ENABLED") "1" }}
peertube-rtmp:
address: ":1935"
{{ end }}
{{ if eq (env "SSB_MUXRPC_ENABLED") "1" }}
ssb-muxrpc:
address: ":8008"
{{ end }}
{{ if eq (env "MSSQL_ENABLED") "1" }}
mssql:
address: ":1433"
{{ end }}
{{ if eq (env "MUMBLE_ENABLED") "1" }}
mumble:
address: ":64738"
mumble-udp:
address: ":64738/udp"
{{ end }}
{{ if eq (env "METRICS_ENABLED") "1" }}
metrics:
address: ":8082"
{{ end }}
ping:
entryPoint: web
{{ if eq (env "METRICS_ENABLED") "1" }}
metrics:
prometheus:
entryPoint: metrics
{{ end }}
certificatesResolvers:
staging:
acme:
email: {{ env "LETS_ENCRYPT_EMAIL" }}
storage: /etc/letsencrypt/staging-acme.json
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
httpChallenge:
entryPoint: web
{{ if eq (env "LETS_ENCRYPT_DNS_CHALLENGE_ENABLED") "1" }}
dnsChallenge:
provider: {{ (env "LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER") }}
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
{{ end }}
production:
acme:
email: {{ env "LETS_ENCRYPT_EMAIL" }}
storage: /etc/letsencrypt/production-acme.json
httpChallenge:
entryPoint: web
{{ if eq (env "LETS_ENCRYPT_DNS_CHALLENGE_ENABLED") "1" }}
dnsChallenge:
provider: {{ (env "LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER") }}
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
{{ end }}