Hi team!
so i'm trying to access my web UI from another device all on LAN:
what i can do:
- i can reach/display the web UI of traefik from another device at 192.168.1.50 # this is the IP of my host, not the container
- i can curl my app1(whoami): curl -H Host:app1.192.168.1.50 http://192.168.1.50 # i receive the correct answer
what i can't do: - i can't reach the web UI of app1.192.168.1.50 in my browser nothing happen
if i'm on the host (192.168.1.50) i can reach web UI from both
- app1.localhost = display tthe web UI of whoami
- localhost = display the web UI of traefik
the point for me it's to close all my port and let traefik manage all my port, basic stuff but i'm blocked
if some mastermind have some free time for help
services:
traefik:
restart: unless-stopped
container_name: traefik
hostname: traefik
image: traefik:v3.0
- --api.insecure=true
- --api.dashboard=true
- --api.debug=true
- --providers.docker.exposedByDefault=false
- "--providers.docker.defaultRule=Host(`localhost`) || (Host(`192.168.1.50`))"
- --entrypoints.http.address=:80
- --providers.docker=true
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- "traefik.enable=true" # active la gestion de ce container par Traefik
- "traefik.http.routers.traefik.rule=Host(`localhost`) || (Host(`192.168.1.50`))"
- "traefik.http.routers.traefik.service=api@internal"
app1:
image: containous/whoami
labels:
- "traefik.enable=true"
- "traefik.http.routers.app1.rule=Host(`app1.localhost`) || (Host(`app1.192.168.1.50`))"
- "traefik.http.services.app1.loadBalancer.server.port=80"