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:
@@ -58,6 +58,14 @@ ADMIN_PASSWORD=
|
|||||||
JWT_SECRET=
|
JWT_SECRET=
|
||||||
JWT_EXPIRE_HOUR=24
|
JWT_EXPIRE_HOUR=24
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Configuration File (Optional)
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Path to custom config file (relative to docker-compose.yml directory)
|
||||||
|
# Copy config.example.yaml to config.yaml and modify as needed
|
||||||
|
# Leave unset to use default ./config.yaml
|
||||||
|
#CONFIG_FILE=./config.yaml
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Gemini OAuth (OPTIONAL, required only for Gemini OAuth accounts)
|
# Gemini OAuth (OPTIONAL, required only for Gemini OAuth accounts)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ services:
|
|||||||
# Data persistence (config.yaml will be auto-generated here)
|
# Data persistence (config.yaml will be auto-generated here)
|
||||||
- sub2api_data:/app/data
|
- sub2api_data:/app/data
|
||||||
# Mount custom config.yaml (optional, overrides auto-generated config)
|
# 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:
|
environment:
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
# Auto Setup (REQUIRED for Docker deployment)
|
# Auto Setup (REQUIRED for Docker deployment)
|
||||||
|
|||||||
Reference in New Issue
Block a user