GB-Traefik/traefik.yml

81 lines
2.2 KiB
YAML

## STATIC CONFIGURATION
log:
level: "DEBUG"
filePath: "/var/log/traefik/traefik.log"
accessLog:
filePath: "/var/log/traefik/access.log"
filters:
statusCodes:
- "200-299" # log successful http requests
- "400-599" # log failed http requests
api:
insecure: false
dashboard: true
entryPoints:
web:
address: "10.0.0.225:80"
forwardedHeaders:
insecure: true #traefik-plugin-cloudflare already handle the real-ip from cloudflare to X-Forwarded-For
http:
redirections: # HTTPS redirection (80 to 443)
entryPoint:
to: "websecure" # The target element
scheme: "https"
websecure:
address: "10.0.0.225:443"
forwardedHeaders:
insecure: true
http3: {}
internal_web:
address: "192.168.50.4:80"
http:
redirections: # HTTPS redirection (80 to 443)
entryPoint:
to: "internal_websecure" # The target element
scheme: "https"
internal_websecure:
address: "192.168.50.4:443"
http3: {}
metrics:
address: "127.0.0.1:8082"
dashboard:
address: "127.0.0.1:9090"
global:
checknewversion: false # Periodically check if a new version has been released.
sendanonymoususage: false # Periodically send anonymous usage statistics.
providers:
docker:
exposedByDefault: false
# defaultRule: "Host(`{{ .ContainerName }}.gbanyan.net`)"
file:
filename: "/dynamic.yml" # Enable dynamic configuration file
certificatesResolvers:
letsencrypt:
acme:
email: gbanyan.huang@gmail.com
storage: /letsencrypt/acme.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
# caServer: "https://acme-staging.api.letsencrypt.org/directory"
metrics:
prometheus:
entryPoint: metrics
experimental:
plugins:
cloudflare:
moduleName: github.com/agence-gaya/traefik-plugin-cloudflare
version: v1.2.0
bouncer:
moduleName: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
version: v1.4.2