本地部署:顶层 docker-compose/config,域名 agent.ai.foresh.com(nginx-proxy VIRTUAL_HOST + external my-app-network,仅内网 expose 8080,config 只读挂载);配置后缀统一 .yaml→.yml(文件与全部引用,含 Dockerfile/AGENT_CONFIG/config.js/smoke)。smoke 25/25 通过

This commit is contained in:
2026-08-31 08:42:16 +08:00
parent cef9f815f7
commit b816efc23f
12 changed files with 92 additions and 86 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
// 配置加载:AGENT_CONFIG 指向 config.yaml(见 config.example.yaml)
// 配置加载:AGENT_CONFIG 指向 config.yml(见 config.example.yml)
const fs = require('fs');
const path = require('path');
const YAML = require('yaml');
@@ -33,7 +33,7 @@ function deepMerge(base, extra) {
}
function loadConfig(configPath) {
const p = configPath || process.env.AGENT_CONFIG || path.join(__dirname, '..', 'config.yaml');
const p = configPath || process.env.AGENT_CONFIG || path.join(__dirname, '..', 'config.yml');
let raw = {};
if (fs.existsSync(p)) {
raw = YAML.parse(fs.readFileSync(p, 'utf8')) || {};