-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
29 lines (29 loc) · 1.36 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
networks:
traefik-network:
external: true
services:
traefik-service:
image: traefik:v3.3
container_name: traefik-container
restart: unless-stopped
networks:
traefik-network:
ports:
- "80:80"
- "443:443"
volumes: #source:destination, destination files here should match to those specified in static configuration config/traefik.yml
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/var/www/traefik/config/dynamic:/etc/traefik/dynamic:ro"
- "/var/www/traefik/config/traefik.yml:/etc/traefik/traefik.yml:ro"
- "/var/www/traefik/data/acme.json:/etc/traefik/acme.json:rw"
- "/var/www/traefik/logs/traefik/access.log:/var/log/traefik/access.log:rw"
- "/var/www/traefik/logs/traefik/traefik.log:/var/log/traefik/traefik.log:rw"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik-service.entrypoints=websecure"
- "traefik.http.routers.traefik-service.rule=Host(`<your-traefik-dashboard.domain>`)"
- "traefik.http.routers.traefik-service.tls=true"
- "traefik.http.routers.traefik-service.tls.certresolver=letsencrypt"
- "traefik.http.middlewares.traefik-service-auth.basicauth.users=yourusername:hashedpasswd"
- "traefik.http.routers.traefik-service.middlewares=traefik-service-auth"
- "traefik.http.routers.traefik-service.service=api@internal"