chore: add Drone CI/CD, docker-compose, deploy script and update Dockerfile to Java 21

This commit is contained in:
mediabot-pt
2026-06-29 10:49:09 +08:00
parent baa04b5138
commit 5b86621f81
5 changed files with 150 additions and 2 deletions

32
deploy.sh Normal file
View File

@@ -0,0 +1,32 @@
# PAR Server 部署脚本
# 用法: ./deploy.sh [version]
set -e
HARBOR="192.168.31.253"
PROJECT="yescent"
VERSION=${1:-latest}
echo "====== 开始部署 PAR Server ======"
echo "版本: $VERSION"
# 登录 Harbor
docker login $HARBOR
# 拉取镜像
docker pull $HARBOR/$PROJECT/par:$VERSION
# 停止旧容器
docker compose down 2>/dev/null || true
# 启动新容器
docker compose up -d
# 等待健康检查
echo "等待服务启动..."
sleep 15
# 验证部署
curl -s http://localhost:${APP_PORT:-9012}/health && echo " 部署成功" || echo " 部署异常"
echo "====== 部署完成 ======"