I cannot publish my service in port 8080 even I redirect dasboard to another port, Traefik automatically redirect URL http://localhost:8080 to http://localhost:8080/dasboard. I need to publish in port 8080 because infrastructure out of my control.
Everything works fine if I use another port to publish my service.
My docker-compose looks like:
version: "3.3"
services:
traefik:
image: "traefik:v2.8.1"
command:
- "--api.insecure=false"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.traefik.address=:9090"
- "--entrypoints.web.address=:80"
ports:
- "4000:9090"
- "8080:80" # if I put another port works fine
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
salamandra:
image: "salamandra"
container_name: "salamandra"
ports:
- "5000:8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.salamandra.rule=Host(`localhost`)"
- "traefik.http.routers.salamandra.entrypoints=web"