fix: 运行数据改用命名卷,避免 bind mount 属主导致的 PermissionError

This commit is contained in:
houhuan committed 2026-11-16 12:52:04 +08:00
1 parent bc3b95f800
commit b19a071a6e
2 files changed
+13 -2

No files matched your search

+6 -1
View File
@@ -14,7 +14,9 @@ services:
FX_LOG_LEVEL: ${FX_LOG_LEVEL:-INFO}
volumes:
- ./config.yaml:/app/config.yaml:ro
- ./data:/app/data
# 运行数据用命名卷:Docker 会按镜像内 /app/data 的属主(10001)初始化,
# 换成 bind mount 需要手工 chown 10001:10001,否则容器非 root 用户写不进去
- fengxiang-data:/app/data
ports:
# 宿主机 52100 -> 容器 8089(管理/健康检查;Cookie 上传走这个口)
- "52100:8089"
@@ -23,3 +25,6 @@ services:
options:
max-size: "10m"
max-file: "3"
volumes:
fengxiang-data: