Microx007

traefik.yaml

Jan 30th, 2022 (edited)
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.95 KB | None | 0 0
  1. api:
  2.   dashboard: true
  3.   insecure: true
  4. # Log level INFO|DEBUG|ERROR
  5. log:
  6.   level: INFO
  7. #Enable write to log:
  8. accessLog:
  9.   filePath: "/etc/traefik/access.log"
  10. global:
  11.   checkNewVersion: true
  12.   sendAnonymousUsage: true
  13. serversTransport:
  14.   insecureSkipVerify: true
  15. entryPoints:
  16.  # Not used in apps, but redirect everything from HTTP to HTTPS
  17.   http:
  18.     address: :80
  19.  
  20.   # HTTPS endpoint, with domain wildcard
  21.   https:
  22.     address: :443
  23.     forwardedHeaders:
  24.      # Reuse list of Cloudflare Trusted IP's above for HTTPS requests
  25.       trustedIPs: &trustedIps
  26.         <bunch of CF-IPs>
  27.        # End of Cloudlare public IP list
  28.     http:
  29.       tls:
  30.        # Generate a wildcard domain certificate
  31.         certResolver: letsencrypt
  32.         domains:
  33.           - main: domain.de
  34.             sans:
  35.              - '*.domain.de'
  36.       middlewares:
  37.        - securityHeaders@file
  38.         - auth@file    #Authelia
  39. #==================================================================================================#
  40. providers:
  41.   providersThrottleDuration: 2s
  42.   # File provider for connecting things that are outside of docker / defining middleware
  43.   file:
  44.     filename: /etc/traefik/fileConfig.yml
  45.     watch: true
  46.   # Docker provider for connecting all apps that are inside of the docker network
  47.   docker:
  48.     watch: true
  49.     network: proxy
  50.     # Default host rule to containername.domain.example
  51.     #defaultRule: "Host(`{{ index .Labels \"com.docker.compose.service\"}}.domain.de`)" #Auskommentiert -> Mach es selbst!
  52.     swarmModeRefreshSeconds: 15s
  53.     exposedByDefault: false
  54. #==================================================================================================#
  55. # Use letsencrypt to generate ssl serficiates
  56. certificatesResolvers:
  57.   letsencrypt:
  58.     acme:
  59.       email: [email protected]
  60.       storage: /etc/traefik/acme.json
  61.       dnsChallenge:
  62.         provider: cloudflare
  63.         #CF_API_KEY: <token>
  64.         #Used to make sure the dns challenge is propagated to the rights dns servers
  65.         resolvers:
  66.          - "1.1.1.1:53"
  67.           - "1.0.0.1:53"
  68. #==================================================================================================#
  69. tls:
  70.   options:
  71.    # To use with the label "traefik.http.routers.myrouter.tls.options=modern@file"
  72.     modern:
  73.       minVersion: "VersionTLS13"                          # Minimum TLS Version
  74.       sniStrict: true                                     # Strict SNI Checking
  75.     default:
  76.       cipherSuites:
  77.        - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
  78.         - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
  79.         - "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
  80.         - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
  81.         - "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305"
  82.         - "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305"
  83.       minVersion: "VersionTLS12"                          # Minimum TLS Version
  84.       sniStrict: true                                     # Strict SNI Checking  
  85.  
Advertisement
Add Comment
Please, Sign In to add comment