feat(config): 添加 Node.js 堆内存配置和代理路径规范化
- 在 .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:
@@ -185,6 +185,14 @@ create_conf_by_template() {
|
||||
local domain=$1
|
||||
local target_file=$2
|
||||
|
||||
# 始终优先使用仓库维护的完整代理模板,避免仅生成前端 location /。
|
||||
if [ -f "./easyai-proxy.conf.sample" ]; then
|
||||
cp "./easyai-proxy.conf.sample" "./$target_file"
|
||||
sed -i.bak "s/51easyai\.com/$domain/g" "./$target_file"
|
||||
rm -f "./$target_file.bak"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -f "./demo.51easyai.com.conf" ]; then
|
||||
cp "./demo.51easyai.com.conf" "./$target_file"
|
||||
sed -i.bak "s/www\.demo\.51easyai\.com/www.$domain/g; s/demo\.51easyai\.com/$domain/g" "./$target_file"
|
||||
|
||||
Reference in New Issue
Block a user