traefik/docker-compose.yml
2024-05-17 23:40:11 +02:00

30 lines
785 B
YAML

version: '3'
services:
reverse-proxy:
# 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
ports:
# The HTTP port
- "8188:80"
# The Web UI (enabled by --api.insecure=true)
- "8088:8080"
volumes:
- /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`)"
networks:
web:
external: true