feat(部署): 支持通过环境变量配置挂载的配置文件路径

- docker-compose.yml 配置文件挂载路径改为 ${CONFIG_FILE:-./config.yaml}
- .env.example 添加 CONFIG_FILE 配置项,方便用户指定自定义配置文件

🤖 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:40:30 +08:00
parent 4c1293a74c
commit ce7893ee44
2 changed files with 11 additions and 1 deletions

View File

@@ -29,7 +29,9 @@ services:
# 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
# Set CONFIG_FILE in .env to specify a custom config file path
# Default: ./config.yaml (copy from config.example.yaml and modify)
- ${CONFIG_FILE:-./config.yaml}:/app/data/config.yaml:ro
environment:
# =======================================================================
# Auto Setup (REQUIRED for Docker deployment)