Files
Docker/compose/traefik.yaml

27 lines
851 B
YAML

networks:
proxy:
external: true
name: traefik
services:
proxy:
image: ghcr.io/traefik/traefik:3.6.7
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /srv/traefik/traefik.yaml:/etc/traefik/traefik.yaml:ro
- /srv/traefik/config:/etc/traefik/config
- /srv/traefik/certs:/etc/traefik/certs
networks:
- proxy
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.traefik.rule=Host(`traefik.example.com`)
- traefik.http.routers.traefik.entrypoints=websecure
- traefik.http.routers.traefik.tls=true
- traefik.http.routers.traefik.service=api@internal
- traefik.http.routers.traefik.middlewares=traefikAuth
- traefik.http.middlewares.traefikAuth.basicauth.users=admin:$$apr1$$xxx$$xxxx