From de95af8e9fac0e3b5369276b6299b7d6beb9b2e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Sat, 23 May 2026 03:52:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20=E8=A7=A3=E5=86=B3=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E6=9B=B4=E6=96=B0=E5=90=8Enginx=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=81=9C=E6=AD=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加检查nginx运行状态逻辑 - 在nginx未运行时自动启动服务 - 防止因--remove-orphans时序问题导致的nginx停止 - 确保部署完成后nginx正常运行 --- scripts/update.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/update.sh b/scripts/update.sh index f2f3e4c..b223366 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -487,6 +487,13 @@ for _svc in tenant-service im-service file-service update-service license-servic fi done +# 确保 nginx 在运行(一键更新时可能因 --remove-orphans 时序问题导致 nginx 被停掉) +if ! $_COMPOSE ps --services --filter status=running 2>/dev/null | grep -q "^nginx$"; then + info "nginx 未运行,正在启动 ..." + $_COMPOSE up -d --no-deps nginx + ok "nginx 已启动" +fi + # --------------------------------------------------------------------------- # Step 7 — 等待 tenant-service 健康 # ---------------------------------------------------------------------------