Hi all,
On my local network, with a respberryPi 4, I tried to enable traefik in order to access to my services on :
pi.local/homeassistant
pi.local/homebridge
etc..
pi.local is working and redirect on my rpi4.
I use docker-compose, and I already use traefik on a external server with https, so I try to adapt this to my local network.
My docker-compose.yml and traefik.toml are :
docker-compose.yml
version: "3"
services:
traefik:
image: traefik:latest
# command: --api.insecure --providers.docker
command: --providers.docker
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dockers/traefik/traefik.toml:/traefik.toml
- /dockers/traefik/acme.json:/acme.json
networks:
- webgateway
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule= Host(`pi.local`) && PathPrefix(`/traefik`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.entrypoints=web"
whoami:
image: "traefik/whoami"
container_name: "simple-service"
networks:
- webgateway
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule= Host(`pi.local`) && PathPrefix(`/whoami`)"
- "traefik.http.routers.whoami.entrypoints=web"
networks:
webgateway:
external: true
traefik.toml
[entryPoints]
[entryPoints.web]
address = ":80"
[providers]
[providers.docker]
watch = true
exposedByDefault = false
network = "webgateway"
With this configuration, whoami works and accessible on pi.local/whoami
But pi.local/traefik return a 404 error.
I tried a lot of things but can't success.
Thanks a lot to helping me,
Pierre