79377632

Date: 2025-01-22 12:08:59
Score: 1.5
Natty:
Report link

The solution was (as partly mentioned by @bluepuma77) to split the config the following way (I also changed from toml to yaml, but that shouldnt matter):

traefik.yaml:

entryPoints:
  web:
    address: ":80"

log:
  level: DEBUG

accessLog: {}

api:
  dashboard: true
  insecure: true

providers:
  file:
    filename: /etc/traefik/traefik-dynamic.yaml
    watch: true

And traefik-dynamic.yaml:

http:
  routers:
    api:
      rule: Host(`api.localhost`)
      service: api
  services:
    api:
      loadBalancer:
        servers:
          - url: http://web:8000
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @bluepuma77
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Gronnmann