deploy: 适配 1Panel 单机(复用现有 PG、回环端口、手动触发 workflow)

This commit is contained in:
ci
2026-10-20 19:16:05 +08:00
parent 5db90af73a
commit 93edad28e5
3 changed files with 37 additions and 28 deletions

12
deploy.sh Normal file → Executable file
View File

@ -214,12 +214,14 @@ else
export RELEASE="${RELEASE:-latest}"
fi
# 首次部署先让代理起来(前端构建期要用 18091 取 SSG 数据)
if ! healthy proxy; then
echo "==> 启动代理(首次会一并拉起 db 与 a 槽)"
docker compose up -d proxy
fi
# 首次部署:先写切换点,再只启动代理。
# - render_active 必须先于 proxy 启动,否则 include 的 map 为空,nginx 会因未知变量启动失败。
# - --no-deps 避免首次起代理时顺带构建前端(此时 18091 尚未就绪,SSG 取数会失败)。
render_active
if ! healthy proxy; then
echo "==> 启动代理(首次只起代理,槽位由 roll 流程构建)"
docker compose up -d --no-deps proxy
fi
if [ "$TARGET" = "rollback" ]; then
do_rollback