-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
66 lines (62 loc) · 2.33 KB
/
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
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
version: '3.9'
services:
traefik:
image: traefik:v3.0
container_name: traefik
restart: always
environment:
PUID: 65534
PGID: 65534
TZ: ${TIMEZONE}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
command:
- "--log.level=INFO"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.websecure.asDefault=true"
- "--entrypoints.websecure.http.tls.certresolver=letsencrypt"
- "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
- "--certificatesresolvers.letsencrypt.acme.tlschallenge=true"
- "--certificatesresolvers.letsencrypt.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" # remove this line for production!!
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
- "--accesslog=true"
- "--accesslog.fields.names.StartUTC=drop"
- "--accessLog.fields.headers.names.User-Agent=keep"
- "--ping"
- "--global.checkNewVersion=true"
- "--global.sendAnonymousUsage=false"
labels:
traefik.enable: "true"
traefik.http.routers.mydashboard.rule: "Host(`${TRAEFIK_DASHBOARD_FQDN}`)"
traefik.http.routers.mydashboard.service: "api@internal"
traefik.http.routers.mydashboard.middlewares: "myauth"
traefik.http.middlewares.myauth.basicauth.users: "traefik:$$2y$$05$$WRfov7xcuKdtZHJ5MBTc9uIEB1Fk0hd6nxpr00CaOy3bcFudv2J2u"
healthcheck:
test: "traefik healthcheck --ping"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./letsencrypt:/letsencrypt
networks:
- traefik
whoami:
image: "traefik/whoami"
container_name: "sample-service"
labels:
traefik.enable: true
traefik.http.routers.observium.rule: "Host(`${WHOAMI_FQDN}`)"
traefik.http.routers.observium.entrypoints: "websecure"
traefik.http.routers.observium.tls.certresolver: "letsencrypt"
networks:
- traefik
networks:
traefik:
external: true