本地AI部署
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 启动脚本
|
||||
APP_NAME="digital-application-3.2.0.jar"
|
||||
APP_PATH="/home/ubuntu/digital-cloth-backend-service/digital-application/target"
|
||||
|
||||
# 检查jar文件是否存在
|
||||
if [ ! -f "${APP_PATH}/${APP_NAME}" ]; then
|
||||
echo "错误:jar文件不存在!"
|
||||
echo "请先运行:mvn package -DskipTests"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 启动应用
|
||||
echo "正在启动应用..."
|
||||
nohup java -jar "${APP_PATH}/${APP_NAME}" > digital-application.log 2>&1 &
|
||||
|
||||
# 检查启动状态
|
||||
sleep 3
|
||||
if pgrep -f "${APP_NAME}" > /dev/null; then
|
||||
echo "应用启动成功!"
|
||||
echo "日志文件:digital-application.log"
|
||||
echo "访问地址:http://$(hostname -I | awk '{print $1}'):9281"
|
||||
echo "Swagger文档:http://$(hostname -I | awk '{print $1}'):9281/doc.html"
|
||||
else
|
||||
echo "应用启动失败!"
|
||||
echo "请查看日志文件:digital-application.log"
|
||||
fi
|
||||
Reference in New Issue
Block a user