fix(deploy): reuse staging backend images by default

This commit is contained in:
Xiaoxia AI
2026-06-24 19:48:12 +08:00
parent 4579621cc0
commit bdb87508a1
2 changed files with 13 additions and 3 deletions
+6
View File
@@ -154,3 +154,9 @@ V21 结构:三张套餐 feature 卡片,免费版/专业版/企业版,推
- Host-shell 执行 deploy-staging.sh 时脚本默认 HOST_PREFIX=/host,导致找不到 /host/var/lib/xiaoxia-saas-staging/repo。
- Workflow 已改为 HOST_PREFIX= WEB_PORT=3001 .../deploy-staging.sh,适配宿主机直接执行。
## 2026-06-24 Staging 后端镜像复用记录
- Staging 当前目标是验证 V21 Web UIdeploy 不应因未变更的 API/Worker 基础镜像拉取失败而阻塞。
- deploy-staging.sh 已改为默认只构建 Web;如需后端重建/迁移,显式设置 REBUILD_BACKEND=1 / RUN_MIGRATIONS=1。
+7 -3
View File
@@ -35,10 +35,13 @@ export WEB_PORT
export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0
docker compose build --pull=false api
docker compose build --pull=false worker
if [ "${REBUILD_BACKEND:-0}" = "1" ]; then
docker compose build --pull=false api
docker compose build --pull=false worker
fi
docker compose build --pull=false web
docker compose run --rm --no-deps api sh -c '
if [ "${RUN_MIGRATIONS:-0}" = "1" ]; then
docker compose run --rm --no-deps api sh -c '
cd /app
set +e
python - <<"PY"
@@ -72,5 +75,6 @@ PY
exit "$status"
fi
'
fi
docker compose up -d api worker web
docker compose ps