Guest User

Untitled

a guest
Sep 24th, 2019
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. version: "3.7"
  2.  
  3. services:
  4.  
  5. traefik:
  6. image: traefik:2.0.0
  7. ports:
  8. - "80:80"
  9. - "443:443"
  10. # - "8080:8080"
  11. volumes:
  12. - /var/run/docker.sock:/var/run/docker.sock
  13. - /docker/traefik/:/etc/traefik:rw
  14. - /docker/traefik/acme.json:/acme.json:rw
  15. - /docker/traefik/traefik.toml:/traefik.toml:ro
  16. deploy:
  17. placement:
  18. constraints: [node.role == manager]
  19. labels:
  20. traefik.enable: "true"
  21. traefik.http.middlewares.https_redirect.redirectscheme.scheme: https
  22. traefik.http.middlewares.https_redirect.redirectscheme.permanent: "true"
  23. traefik.http.routers.traefik_https.rule: "Path(`/dashboard`)"
  24. traefik.http.routers.traefik_https.entrypoints: websecure
  25. traefik.http.routers.traefik_https.tls: "true"
  26. traefik.http.routers.traefik_https.tls.certResolver: "letsencrypt"
  27. traefik.http.routers.traefik_https.tls.domains[0].main: "example.domain.tld"
  28. # traefik.http.routers.traefik_https.service: api@internal
  29. # traefik.http.routers.traefik_https.middlewares: myAuth
  30. # traefik.http.middlewares.myAuth.basicauth.users: "test:$1$OCALAPVm$MFNW0J9d.m.a/1RDQSQVZ0"
  31. traefik.http.routers.http_catchall.rule: "hostregexp(`{host:.+}`)"
  32. traefik.http.routers.http_catchall.entrypoints: web
  33. traefik.http.routers.http_catchall.middlewares: https_redirect
  34.  
  35.  
  36.  
  37.  
  38.  
  39. ################################################################
  40. #
  41. # Configuration sample for Traefik v2.
  42. #
  43. ################################################################
  44.  
  45. ################################################################
  46. # Global configuration
  47. ################################################################
  48. [global]
  49. checkNewVersion = true
  50. sendAnonymousUsage = false
  51.  
  52. ################################################################
  53. # Entrypoints configuration
  54. ################################################################
  55.  
  56. [entryPoints]
  57. [entryPoints.web]
  58. address = ":80"
  59.  
  60. [entryPoints.websecure]
  61. address = ":443"
  62.  
  63. ################################################################
  64. # Traefik logs configuration
  65. ################################################################
  66.  
  67. [log]
  68.  
  69. level = "DEBUG"
  70.  
  71. ################################################################
  72. # API and dashboard configuration
  73. ################################################################
  74.  
  75. # Enable API and dashboard
  76.  
  77. [api]
  78. dashboard = true
  79. debug = true
  80. # insecure = true
  81.  
  82. ################################################################
  83. # ACME
  84. ################################################################
  85.  
  86. [certificatesResolvers.letsencrypt.acme]
  87. email = "[email protected]"
  88. storage = "acme.json"
  89.  
  90. [certificatesResolvers.letsencrypt.acme.dnsChallenge]
  91. provider = "netcup"
  92.  
  93. ################################################################
  94. # Ping configuration
  95. ################################################################
  96.  
  97. # Enable ping
  98. [ping]
  99.  
  100. # Default: "traefik"
  101.  
  102. ################################################################
  103. # Docker configuration backend
  104. ################################################################
  105.  
  106. [providers]
  107. [providers.docker]
  108. endpoint = "unix:///var/run/docker.sock"
  109. defaultRule = "Host(`{{ normalize .Name }}.domain.tld`)"
  110. watch = true
  111. exposedByDefault = false
  112. swarmMode = true
Advertisement
Add Comment
Please, Sign In to add comment