Servers transport not found in docker dynamic configuration

Hi all,

I need to use a servers transport configuration defined in my static file (trafik.yml) into a docker-compose file:

Static file configuration is:

...
serversTransports:
    insecureTransport:
      insecureSkipVerify: true
    
    homelabTransport:
      certificates:
        - certFile: /etc/traefik/certs/homelab-crt.pem
          keyFile: /etc/traefik/certs/homelab-key.pem
...

In my docker compose file I've used:

 labels:
   - "traefik.enable=true"
   - "traefik.http.routers.influxdb.rule=Host(`service.example.com`)"
   - "traefik.http.routers.influxdb.tls=true"
   - "traefik.http.routers.influxdb.entrypoints=web, websecure"
   - "traefik.http.services.influxdb.loadbalancer.server.port=8086"
   - "traefik.http.services.influxdb.loadbalancer.server.scheme=https"
   - "traefik.http.services.influxdb.loadbalancer.serverstransport=homelabTransport"

But when the containers starts I got this error on traefik log:

level=error msg="servers transport not found homelabTransport@docker" routerName=websecure-influxdb@docker entryPointName=websecure

What am I doing wrong here? Is it possibile to use a static file entity in the dynamic configuration?
I've an https service that used a self signed certificate and I'm trying to create a load balancer rule from trafik to this service.

Thanks in advanced

I solved the issue reading the section Provider Namespace of the documentation.

To reference an entity defined in other Namespace we need to use the specific notion, in my case I changed the docker-compose file in this way:

- "traefik.http.services.influxdb.loadbalancer.serverstransport=homelabTransport@file"

Hope this could help someone else, unfortunately seems this community is no longer very active anymore

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.