diff --git a/docker-compose.yml b/docker-compose.yml index f5c13b3..1abb40c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,9 @@ services: # The official v3 Traefik docker image image: traefik:v3.0 # Enables the web UI and tells Traefik to listen to docker - command: --api.insecure=true --providers.docker + networks: + - web + - default ports: # The HTTP port - "8188:80" @@ -15,15 +17,12 @@ services: - /volume1/docker/traefik/conf/traefik.yml:/etc/traefik/traefik.yml # So that Traefik can listen to the Docker events - /var/run/docker.sock:/var/run/docker.sock - networks: - - web - - default whoami: # A container that exposes an API to show its IP address image: traefik/whoami labels: - - "traefik.http.routers.whoami.rule=path(`/whoami`)" + - "traefik.http.routers.whoami.rule=Host(`whoami.docker.local`)" networks: web: