Hi @floatingpurr,
Thanks for your interest in Traefik.
The "too many redirects" error comes from a loop that occurs in your traefik container.
When using traefik labels for dynamic configuration, the server url is not configurable and always points to the container ip. The label traefik.http.services.foo.loadbalancer.server.url
with the value http://192.168.0.8080
is just ignored.
For you use case, I suggest you to use the file provider for the dynamic configuration.
To do so, you have to:
- enable the file provider in the traefik command:
command:
--providers.file.filename=/path/to/dynamic.yml
volumes:
- ./config.yml:/path/to/dynamic.yml
- create the dynamic config file (
./config.yml
):
http:
routers:
foo:
rule: Host(`match.example.com`)
service: foo
services:
foo:
loadBalancer:
servers:
- url: http://host.docker.internal:8081