fix(部署): 配置文件挂载改为可选,避免 Docker 自动创建目录

当挂载的源文件不存在时,Docker 会自动创建同名目录而非文件。
将配置文件挂载默认注释,用户需要时先创建文件再取消注释。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
yangjianbo
2026-01-05 15:50:29 +08:00
parent 4c1293a74c
commit 1aef4ce20d

View File

@@ -28,8 +28,9 @@ services:
volumes:
# Data persistence (config.yaml will be auto-generated here)
- sub2api_data:/app/data
# Mount custom config.yaml (optional, overrides auto-generated config)
- ./config.yaml:/app/data/config.yaml:ro
# Optional: Mount custom config.yaml (uncomment and create the file first)
# Copy config.example.yaml to config.yaml, modify it, then uncomment:
# - ./config.yaml:/app/data/config.yaml:ro
environment:
# =======================================================================
# Auto Setup (REQUIRED for Docker deployment)