Hi,
My provider is Docker. I have a container (a LibreNMS container) that listen on multiple port including 514 and 8000. Traefik detects only the port 514, however I would like Traefik to route to the service with the port 8000 as well.
The documentation specifies that I need to add the label traefik.http.services.<service_name>.loadbalancer.server.port
however I cannot do and don't want to do it with my docker-compose. So, I tried to add it in the traefik.yml file with the entire configuration as show below:
## traefik.yml
# Docker configuration backend
providers:
docker:
defaultRule: "Host(`{{ trimPrefix `/` .Name }}.myexample.com`)"
# API and dashboard configuration
api:
insecure: true
## Static configuration
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
http:
routers:
rule: "Host(`librenms-librenms-docker.myexample.com`"
entryPoints: [web,websecure]
services:
librenms-librenms-docker@docker:
loadBalancer:
servers:
- url: "http://172.20.0.7:8000"
Unfortunately, even if I force the service to http://172.20.0.7:8000 - where 172.20.0.7 is the container IP - I cannot have it working and receive a "Gateway Timeout" message. Do you have any advice? All other posts include the docker-compose label which is not what I'm looking for to achieve.
Thank you.