feat(config): 添加 Node.js 堆内存配置和代理路径规范化
Test deployment public URL (Linux) / test-linux (push) Canceled after 0s
Test start.ps1 (Windows) / test-windows (push) Canceled after 0s

- 在 .env.sample 中新增 NODE_MAX_OLD_SPACE_SIZE 配置项,默认设置为 8192 MiB
- 在 docker-compose.yml 中添加 NODE_OPTIONS 环境变量配置
- 在 easyai-proxy.conf.sample 中添加 /api 路径规范化重定向规则
- 修改 https.sh 脚本优先使用完整代理模板生成配置文件
- 更新 README.md 添加新版本发布说明
- 扩展测试脚本验证代理配置和路径重定向功能
This commit is contained in:
2026-07-24 22:10:45 +08:00
parent 6ee9666b0c
commit f31e349409
6 changed files with 40 additions and 0 deletions
+17
View File
@@ -8,6 +8,7 @@ trap 'rm -rf "$TMP_DIR"' EXIT
cp \
"$REPO_ROOT/start.sh" \
"$REPO_ROOT/https.sh" \
"$REPO_ROOT/docker-compose.yml" \
"$REPO_ROOT/.env.sample" \
"$REPO_ROOT/.env.tools.sample" \
@@ -29,6 +30,7 @@ reset_case() {
.env.tools \
.env.ASG \
.env.AMS \
easyai-proxy.conf \
demo.example.com.conf
}
@@ -57,6 +59,21 @@ grep -qx 'CONFIG_PUBLIC_API_BASE_URL=http://demo.example.com/api' .env
grep -q 'proxy_set_header X-Forwarded-Host $easyai_forwarded_host;' demo.example.com.conf
grep -q 'proxy_set_header X-Forwarded-Port $server_port;' demo.example.com.conf
grep -q "proxy_set_header X-Original-Prefix '/api';" demo.example.com.conf
grep -q 'location = /api {' demo.example.com.conf
# 直接验证 https.sh 的缺省配置生成函数会采用完整模板,而不是只代理 3010。
eval "$(awk '
/^create_conf_by_template\(\)/ { capture = 1 }
/^conf_contains_domain\(\)/ { capture = 0 }
capture { print }
' https.sh)"
create_conf_by_template demo.example.com easyai-proxy.conf
grep -q 'server_name demo.example.com;' easyai-proxy.conf
grep -q 'location = /api {' easyai-proxy.conf
grep -q 'location /api/ {' easyai-proxy.conf
grep -q 'proxy_pass http://127.0.0.1:3001/;' easyai-proxy.conf
grep -q 'location /socket.io {' easyai-proxy.conf
grep -q 'proxy_set_header X-Forwarded-Host $easyai_forwarded_host;' easyai-proxy.conf
reset_case
DEPLOY_NON_INTERACTIVE=1 \