Endless 502 / forwarding when calling dashboard via subdomain #6123

The network option (providers.docker.network in the static configuration or traefik.docker.network labels in the dynamic configuration) allow to manage the same thing: the way for traefik to get the container IP.

The traefik.docker.network label (in the dynamic configuration) overrides the providers.docker.network option (in the static configuration )

The network option is used by traefik to know on which network the container IP must be taken.
FYI the IP is different following the network.

This network need to be accessible by Traefik, because the routing of a request will call this IP.


api: {} is the YAML syntax for an empty object, so yes this activate the API with the default values. Same thing for tlsChallenge: {}


what happen to the Middleware, shown before

When you are using the insecure mode for the API/dashboard, Traefik creates some configuration (internal provider) to handle the API and the dashboard. If you don't use the insecure mode, Traefik doesn't create those elements.

It's not related to the issue you linked.


Also note that I use a different syntax for labels, because in YAML you can use both syntax to define the value of a map (labels are a map)

Syntax with - at the beginning of the line and = as separator between the key and the value:

myMap:
  - "key1=value1"
  - "key2=value2"
  - "key3=value3"

Syntax without - and with : as separator between the key and the value:

myMap:
  key1: value1
  key2: value2
  key3: value3

I prefer the second syntax because, for me, it's a better representation of the real type (a map).