zhibo/deploy-gift-system-complete.bat
2026-01-03 19:22:42 +08:00

51 lines
1.2 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ========================================
echo 礼物系统完整部署
echo ========================================
echo.
echo [1/4] 编译后端...
cd Zhibo\zhibo-h
call mvn clean package -DskipTests -Pdev
if %errorlevel% neq 0 (
echo 后端编译失败!
pause
exit /b 1
)
echo.
echo [2/4] 编译前端...
cd ..\admin
call npm run build:prod
if %errorlevel% neq 0 (
echo 前端编译失败!
pause
exit /b 1
)
echo.
echo [3/4] 停止远程服务并上传后端...
ssh root@1.15.149.240 "cd /www/server/java && ./stop.sh"
scp ..\zhibo-h\crmeb-admin\target\crmeb-admin.jar root@1.15.149.240:/www/server/java/
echo.
echo [4/4] 上传前端并启动服务...
scp -r dist/* root@1.15.149.240:/www/wwwroot/admin/
ssh root@1.15.149.240 "cd /www/server/java && ./start.sh"
echo.
echo ========================================
echo 部署完成!
echo.
echo 访问地址http://1.15.149.240:9527
echo.
echo 礼物系统菜单:
echo - 礼物列表:管理礼物配置
echo - 打赏记录:查看打赏记录和统计
echo - 充值套餐:管理充值套餐
echo ========================================
pause