-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (65 loc) · 2.49 KB
/
docker-compose.yml
File metadata and controls
69 lines (65 loc) · 2.49 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3"
services:
duckdns:
image: lscr.io/linuxserver/duckdns
container_name: duckdns
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Amsterdam
- SUBDOMAINS=$DUCKDNS_SUBDOMAINS
- TOKEN=$DUCKDNS_TOKEN
- LOG_FILE=true
volumes:
- ./duckdns/config:/config
traefik:
image: traefik:v2.6
container_name: traefik
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
# Put the STATIC configuration here
#
# Use docker
- --providers.docker.endpoint=unix:///var/run/docker.sock
# Require every container to enable traefik with label "traefik.enable: true"
- --providers.docker.exposedByDefault=false
# Set port number for HTTP
- --entrypoints.http.address=:80
- --entrypoints.https.address=:443
# Logging
- --log.level=DEBUG
# Enable API & Dashboard
- --api=true
- --api.dashboard=true
labels:
# Put the DYNAMIC configuration here (and use labels for other containers, too)
#
traefik.enable: true
# Create a router for the API & Dashboard
# \-> HTTPS
traefik.http.routers.traefik-dashboard-https-router.entrypoints: https
traefik.http.routers.traefik-dashboard-https-router.rule: Host(`$DOMAIN_NAME`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
traefik.http.routers.traefik-dashboard-https-router.service: api@internal
# \-> Certificate
traefik.http.routers.traefik-dashboard-https-router.tls.domains.main: $DOMAIN_NAME
# \-> Authentication for Dashboard
traefik.http.middlewares.traefik-dashboard-auth.basicauth.users: $TRAEFIK_DASHBOARD_AUTH
traefik.http.routers.traefik-dashboard-https-router.middlewares: traefik-dashboard-auth
# \-> HTTP
traefik.http.middlewares.traefik-dashboard-redirect.redirectscheme.scheme: https
traefik.http.routers.traefik-dashboard-http-router.entrypoints: http
traefik.http.routers.traefik-dashboard-http-router.rule: Host(`$DOMAIN_NAME`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
traefik.http.routers.traefik-dashboard-http-router.middlewares: traefik-dashboard-redirect
whoami:
image: traefik/whoami
container_name: whoami
labels:
traefik.enable: true
traefik.http.routers.whoami.entrypoints: http
traefik.http.routers.whoami.rule: Host(`$DOMAIN_NAME`) && PathPrefix(`/whoami`)