feat(deploy): VPS原生大脑部署—env覆盖配置+部署文档(Option B落地)
- sanguo_data/config.py: load_config 加 env 覆盖(SANGUO_DATA_ROOT 重映射 daily/raw/qfq/15min/vnpy_db;SANGUO_LIVE_ENABLED/SANGUO_BRIDGE_URL 覆盖 live 段), 三机共用一份 git config 零漂移 - sanguo_api/main.py: build_app 加 SANGUO_DB_PATH/SANGUO_FILE_PATH env 覆盖 - docs/deployment/vps-native-brain.md: VPS原生部署全记录(安装/配置/服务/验证/ 数据staging/Phase2暂缓理由) 实证:VPS vnpy4.4.0+vnpy_qmt0.3.3 连真实miniQMT读真实账户/持仓; live_step全链路+影子transport(本机bridge)通过。详见文档。
This commit is contained in:
+2
-2
@@ -42,8 +42,8 @@ def build_app(config_path: str = "config/backtest.yaml", static_dir: str | None
|
||||
auth = cfg.get("auth", {})
|
||||
pool = cfg.get("pool", {})
|
||||
|
||||
db_path = bt.get("db_path", "/tmp/backtest_results.db")
|
||||
file_dir = bt.get("file_dir", "/tmp/backtest_files")
|
||||
db_path = os.environ.get("SANGUO_DB_PATH") or bt.get("db_path", "/tmp/backtest_results.db")
|
||||
file_dir = os.environ.get("SANGUO_FILE_DIR") or bt.get("file_dir", "/tmp/backtest_files")
|
||||
auth_config = None
|
||||
if auth:
|
||||
auth_config = {
|
||||
|
||||
Reference in New Issue
Block a user