-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (53 loc) · 1.99 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (53 loc) · 1.99 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
services:
cpl:
image: linonetwo/tiddlywiki-cpl:latest
container_name: tiddlywiki-cpl
# TW 不对外暴露,只通过 nginx 访问
# 调试用:localhost:28081 可直连 TW(无 gzip)
expose:
- "8080"
ports:
- "127.0.0.1:28081:8080"
volumes:
- ./cache:/app/cache
- ./wiki/files/plugin-fetched:/app/wiki/files/plugin-fetched
- ./wiki/files/plugin-fetched-history:/app/wiki/files/plugin-fetched-history
- ./wiki/tiddlers/comments/approved:/app/wiki/tiddlers/comments/approved
- ./wiki/tiddlers/comments/pending:/app/wiki/tiddlers/comments/pending
- ./wiki/tiddlers/ratings:/app/wiki/tiddlers/ratings
- ./wiki/tiddlers/compatibility:/app/wiki/tiddlers/compatibility
- ./wiki/tiddlers/download-stats:/app/wiki/tiddlers/download-stats
- ./docker/IfEditorMode.tid:/app/wiki/tiddlers/IfEditorMode.tid:ro
# Shared with nginx: maintenance flag file
- cpl-runtime:/tmp
# ⚠️ 仅开发调试:挂载本地源码以覆盖镜像中的旧代码。
# 前提:必须从 git clone 了完整仓库(确保本地 src/ 目录存在)。
# 如果本地没有 src/,Docker 会创建空目录,导致容器崩溃。
# 生产部署应使用最新镜像,不要挂载此行。
# - ./src:/app/src:ro
env_file:
- .env
environment:
- HOST=0.0.0.0
- PORT=8080
# 通过主机代理下载插件(Docker for Windows 访问主机服务)
- HTTP_PROXY=http://host.docker.internal:1080
- HTTPS_PROXY=http://host.docker.internal:1080
- NODE_ENV=production
restart: always
pull_policy: always
nginx:
image: nginx:alpine
container_name: cpl-nginx
# frpc 指向 127.0.0.1:28080 → nginx → TW
ports:
- "127.0.0.1:28080:80"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# Shared with cpl: maintenance flag file
- cpl-runtime:/tmp
depends_on:
- cpl
restart: always
volumes:
cpl-runtime: