build file
Some checks failed
test/timeline-server/pipeline/head There was a failure building this commit
Some checks failed
test/timeline-server/pipeline/head There was a failure building this commit
This commit is contained in:
42
deploy.bat
Normal file
42
deploy.bat
Normal file
@@ -0,0 +1,42 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
echo 开始部署 Timeline Server...
|
||||
|
||||
REM 检查 Docker 是否运行
|
||||
docker version >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo 错误: 未找到 Docker 或 Docker 未运行,请先启动 Docker
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM 检查 Docker Compose 是否可用
|
||||
docker-compose version >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo 错误: 未找到 Docker Compose,请先安装 Docker Compose
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM 构建项目
|
||||
echo 正在构建项目...
|
||||
call mvnw.cmd clean package -DskipTests
|
||||
|
||||
REM 构建并启动服务
|
||||
echo 正在构建并启动服务...
|
||||
docker-compose up --build -d
|
||||
|
||||
REM 等待服务启动
|
||||
echo 等待服务启动...
|
||||
timeout /t 30 /nobreak >nul
|
||||
|
||||
REM 检查服务状态
|
||||
echo 检查服务状态...
|
||||
docker-compose ps
|
||||
|
||||
echo 部署完成!
|
||||
echo 网关服务: http://localhost:30000
|
||||
echo 故事服务: http://localhost:30001
|
||||
echo 文件服务: http://localhost:30002
|
||||
echo 用户服务: http://localhost:30003
|
||||
|
||||
endlocal
|
||||
Reference in New Issue
Block a user