From ce7893ee442c60d1653f70937da7b4f481a1a94f Mon Sep 17 00:00:00 2001 From: yangjianbo Date: Mon, 5 Jan 2026 15:40:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=83=A8=E7=BD=B2):=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8C=82=E8=BD=BD=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- deploy/.env.example | 8 ++++++++ deploy/docker-compose.yml | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/deploy/.env.example b/deploy/.env.example index ffea8be4..60ec51ec 100644 --- a/deploy/.env.example +++ b/deploy/.env.example @@ -58,6 +58,14 @@ ADMIN_PASSWORD= JWT_SECRET= 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) # ----------------------------------------------------------------------------- diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 17e75e2a..bece2f95 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -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)