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:
39
deploy.sh
Normal file
39
deploy.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Timeline Server 部署脚本
|
||||
set -e
|
||||
|
||||
echo "开始部署 Timeline Server..."
|
||||
|
||||
# 检查是否安装了必要的工具
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "错误: 未找到 docker 命令,请先安装 Docker"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v docker-compose &> /dev/null; then
|
||||
echo "错误: 未找到 docker-compose 命令,请先安装 Docker Compose"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 构建项目
|
||||
echo "正在构建项目..."
|
||||
./mvnw clean package -DskipTests
|
||||
|
||||
# 构建并启动服务
|
||||
echo "正在构建并启动服务..."
|
||||
docker-compose up --build -d
|
||||
|
||||
# 等待服务启动
|
||||
echo "等待服务启动..."
|
||||
sleep 30
|
||||
|
||||
# 检查服务状态
|
||||
echo "检查服务状态..."
|
||||
docker-compose ps
|
||||
|
||||
echo "部署完成!"
|
||||
echo "网关服务: http://localhost:30000"
|
||||
echo "故事服务: http://localhost:30001"
|
||||
echo "文件服务: http://localhost:30002"
|
||||
echo "用户服务: http://localhost:30003"
|
||||
Reference in New Issue
Block a user