This commit is contained in:
mathieu 2024-05-17 23:41:25 +02:00
parent 0394aef25f
commit e8ac2d2705

View File

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