Im trying to set up Traefik. The problem i have is that i have some docker containers that go directly to my LAN. So the IP they have is for example: 10.0.0.6. How do i configure Traefik in a way that it will go to 10.0.0.6:8080 instead of 172.20.0.5:8080
Compose.yml
services:
### qBittorrent #####################################################
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
networks:
VPN:
ipv4_address: 10.0.0.6
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- WEBUI_PORT=8080
- TORRENTING_PORT=6881
volumes:
- /ZFSSD/qbittorrent/appdata:/config
- /ZFSSD/qbittorrent/downloads:/downloads
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.qbittorrent.rule=Host(`qbit.*****.eu`)"
- "traefik.http.routers.qbittorrent.entrypoints=websecure"
- "traefik.http.routers.qbittorrent.tls=true"
- "traefik.http.routers.qbittorrent.tls.certresolver=myresolver"
### Traefik #####################################################
traefik:
image: "traefik:latest"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
#- "--providers.docker.useBindPortIP=true"
- "--entrypoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=traefik@*****.eu"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "8080:8080"
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./letsencrypt:/letsencrypt"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.*****.eu`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=myresolver"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
### WhoAmI #####################################################
whoami:
image: "traefik/whoami"
container_name: "simple-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.*****.eu`)"
- "traefik.http.routers.whoami.entrypoints=websecure"
- "traefik.http.routers.whoami.tls=true"
- "traefik.http.routers.whoami.tls.certresolver=myresolver"
It works fine with WhoAmI but it doesnt work with qBittorrent. Can someone help? I would like to do it all within the compose file if possible, because my server is not yet in a final state and want to be able to just run compose to roll almost everything out.
TL:DR how do I make Traefik go to 10.0.0.6
Im aware 10.0.0.6 is still an internal IP just didnt know how to call it otherwise