新增 local→serve 数据同步功能

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-06 10:27:00 +08:00
parent 1ae2102b4c
commit 274b90eef6
11 changed files with 706 additions and 5 deletions
+3
View File
@@ -97,6 +97,9 @@ class Settings(BaseSettings):
# 公网服务器部署时免去 SSH 端口转发设密码的麻烦。写入 auth.json(哈希)后即不再读取。
auth_password: str = ""
# Sync — 数据同步鉴权 Keylocal→serve 推送时校验 X-Sync-Key 头)
sync_key: str = ""
# Data — frozen: exe 同级 data/ 子目录; 非 frozen: 项目根 data/
# (均可被环境变量 DATA_DIR 覆盖, pydantic-settings 自动注入)
data_dir: Path = _user_data_root()