From dbab1d7b6e87c7e3d4f3c12bced157a94cfb2f15 Mon Sep 17 00:00:00 2001 From: shunli Date: Sun, 12 Apr 2026 10:46:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20=E8=A1=A5=E9=BD=90=20trialrun=20?= =?UTF-8?q?=E8=80=83=E5=8B=A4=E7=8E=AF=E5=A2=83=E5=B9=B6=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20init=20=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 trialrun 环境契约补充 ATTENDANCE_ENABLED=true - 部署脚本先 build init 再 run,避免新迁移和 seed 被旧镜像跳过 --- deploy/trialrun/.env.example | 1 + deploy/trialrun/deploy.sh | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/deploy/trialrun/.env.example b/deploy/trialrun/.env.example index e653bab3..c13fcd97 100644 --- a/deploy/trialrun/.env.example +++ b/deploy/trialrun/.env.example @@ -174,6 +174,7 @@ PORTAL_HOME_ENABLED=true GLOBAL_SEARCH_ENABLED=true ANNOUNCEMENTS_ENABLED=true PRESENCE_BOARD_ENABLED=true +ATTENDANCE_ENABLED=true WEEKLY_REPORT_ENABLED=true EMPLOYEE_LIFECYCLE_ENABLED=true TODO_BOARD_ENABLED=true diff --git a/deploy/trialrun/deploy.sh b/deploy/trialrun/deploy.sh index d222d981..4e734d84 100755 --- a/deploy/trialrun/deploy.sh +++ b/deploy/trialrun/deploy.sh @@ -131,10 +131,13 @@ if [[ "$ENABLE_WORKER" == "1" ]]; then "${compose_cmd[@]}" "${profile_args[@]}" up -d worker fi -echo ">>> 4.3 执行 init" +echo ">>> 4.3 构建最新 init 镜像" +"${compose_cmd[@]}" build init + +echo ">>> 4.4 执行 init" "${compose_cmd[@]}" run --rm -T init >> 4.4 等待 /ready" +echo ">>> 4.5 等待 /ready" ready_ok=0 for i in $(seq 1 60); do if curl -fsS http://127.0.0.1:3000/ready >/dev/null; then @@ -150,21 +153,21 @@ if [[ "$ready_ok" != "1" ]]; then exit 1 fi -echo ">>> 4.5 执行 external deps smoke" +echo ">>> 4.6 执行 external deps smoke" if ! "${compose_cmd[@]}" exec -T server node src/scripts/smoke-external-deps.js; then echo "[ERROR] external deps smoke 失败,输出最近 server 日志" >&2 "${compose_cmd[@]}" logs --tail=200 server || true exit 1 fi -echo ">>> 4.6 执行 runtime smoke" +echo ">>> 4.7 执行 runtime smoke" if ! "${compose_cmd[@]}" exec -T server node src/scripts/smoke-trialrun-runtime.js; then echo "[ERROR] runtime smoke 失败,输出最近 server 日志" >&2 "${compose_cmd[@]}" logs --tail=200 server || true exit 1 fi -echo ">>> 4.7 当前服务状态" +echo ">>> 4.8 当前服务状态" "${compose_cmd[@]}" ps REMOTE