db2: 移除confs依赖,配置全部经CLI传递(CLI > ENV > 默认值)
- db2.cpp: 移除 RpcClient/parse_ini/IniMap,load_config 改为 默认值 → ENV → CLI 三层;新增 --db-url/--retention-days/ --max-records/--cleanup-interval CLI 参数 - core/services.yaml: db2 条目展开为完整 CLI 声明(10个配置项) - db2/README.md: 配置章节重写为 CLI 参数表 + 环境变量表 + services.yaml 示例 - README.md: 配置链路移除 db2,confs 配置表删除 db.ini 行 与 ca/redirect80 保持一致的配置模式,db2 不再依赖 confs 服务。
This commit is contained in:
1 parent
0954644ee3
commit
80969adc9b
4 files changed
+101
-169
No files matched your search
+20
-1
@@ -13,7 +13,26 @@ services:
|
||||
# --- 数据层(最先启动) ---
|
||||
- name: db2
|
||||
cmd: bash /opt/micro_servers/db2/_run.sh
|
||||
args: ["--instance", "db2", "--log-level", "info"]
|
||||
args:
|
||||
- "--instance"
|
||||
- "db2"
|
||||
- "--log-level"
|
||||
- "info"
|
||||
# --- 配置全部经 CLI 传递(原 confs/configs/db.ini 迁入) ---
|
||||
- "--host"
|
||||
- "127.0.0.1"
|
||||
- "--port"
|
||||
- "8005"
|
||||
- "--workers"
|
||||
- "4"
|
||||
- "--db-url"
|
||||
- "sqlite:///database.db"
|
||||
- "--retention-days"
|
||||
- "30"
|
||||
- "--max-records"
|
||||
- "1000000"
|
||||
- "--cleanup-interval"
|
||||
- "3600"
|
||||
depends_on: []
|
||||
sleep_before: 0
|
||||
|
||||
|
||||
Reference in new issue
Block a user