29 lines
796 B
YAML
29 lines
796 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
traefik:
|
|
image: traefik:2.5
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
networks:
|
|
- web
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./conf/traefik.yml:/etc/traefik/traefik.yml:ro
|
|
- ./conf/acme.json:/acme.json
|
|
- ./conf/dynamic:/etc/traefik/dynamic:ro
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.dashboard.rule=Host(`${HOSTNAME}`)
|
|
- traefik.http.routers.dashboard.service=api@internal
|
|
- traefik.http.routers.dashboard.middlewares=auth
|
|
- traefik.http.routers.dashboard.tls=true
|
|
- traefik.http.routers.dashboard.tls.certresolver=myresolver
|
|
- traefik.http.middlewares.auth.basicauth.users=${DASHBOARDUSERS}
|
|
|
|
networks:
|
|
web:
|
|
external: true
|