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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
name: tdwiki
services:
tiddlywiki:
build:
context: .
dockerfile: docker/tiddlywiki/Dockerfile
restart: unless-stopped
init: true
user: "${PUID:-1000}:${PGID:-1000}"
command:
- .
- --listen
- host=0.0.0.0
- port=8080
- gzip=yes
- use-browser-cache=yes
volumes:
- ./tiddlers:/wiki/tiddlers
- ./files:/wiki/files:ro
- ./tiddlywiki.info:/wiki/tiddlywiki.info:ro
expose:
- "8080"
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8080/"]
interval: 10s
timeout: 3s
retries: 12
start_period: 10s
security_opt:
- no-new-privileges:true
redis:
image: redis:7.4-alpine
restart: unless-stopped
command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
security_opt:
- no-new-privileges:true
authelia:
image: authelia/authelia:4.39.20
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
volumes:
- ./docker/authelia:/config:ro
- ./data/authelia:/var/lib/authelia
- ./secrets:/secrets:ro
environment:
TZ: "${TZ:-Asia/Shanghai}"
AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET_FILE: /secrets/authelia_jwt_secret
AUTHELIA_SESSION_SECRET_FILE: /secrets/authelia_session_secret
AUTHELIA_STORAGE_ENCRYPTION_KEY_FILE: /secrets/authelia_storage_encryption_key
expose:
- "9091"
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:9091/api/health"]
interval: 10s
timeout: 3s
retries: 12
start_period: 10s
security_opt:
- no-new-privileges:true
caddy:
build:
context: .
dockerfile: docker/caddy/Dockerfile
args:
GOPROXY: "${GOPROXY:-https://goproxy.cn,direct}"
restart: unless-stopped
depends_on:
tiddlywiki:
condition: service_healthy
authelia:
condition: service_healthy
environment:
BASE_DOMAIN: "${BASE_DOMAIN:-tdwiki.home.arpa}"
ports:
- "8081:80"
- "443:443"
- "443:443/udp"
volumes:
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./files:/srv/files
- ./data/caddy/data:/data
- ./data/caddy/config:/config
security_opt:
- no-new-privileges:true
volumes:
redis-data:
|