build:修改启动命令

This commit is contained in:
jiangrui
2025-03-06 21:30:44 +08:00
parent e8f70b286e
commit 7ed0c04111

View File

@@ -1,13 +1,13 @@
#!/bin/sh
# 如果配置目录下没有 .env 文件,则复制示例文件
if [ ! -f /app/config/.env ]; then
cp /app/.env.example /app/config/.env
echo "已创建默认配置文件 /app/config/.env请根据需要修改配置"
# 如果配置目录下没有 env 文件,则复制示例文件
if [ ! -f /app/config/env ]; then
cp /app/.env.example /app/config/env
echo "已创建默认配置文件 /app/config/env请根据需要修改配置"
fi
# 创建配置文件软链接
ln -sf /app/config/.env /app/.env
ln -sf /app/config/env /app/.env
# 启动 Nginx 和后端服务
nginx -g 'daemon off;' & npm run start