From 7146b19bd321bd6721273abc9326e30db0f9640a Mon Sep 17 00:00:00 2001 From: limeng <1131177064@qq.com> Date: Tue, 15 Sep 2026 11:53:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=9F=E4=BA=A7=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=81=A5=E5=BA=B7=E6=8E=A2=E9=92=88=20(#188)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用容器已声明的公开静态资源执行发布健康检查,避免根路径被 Laravel 防火墙拒绝后误回滚。 --- deploy/activate-incremental-release.sh | 4 ++-- deploy/activate-release.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/activate-incremental-release.sh b/deploy/activate-incremental-release.sh index 642f5690..206518d0 100644 --- a/deploy/activate-incremental-release.sh +++ b/deploy/activate-incremental-release.sh @@ -140,7 +140,7 @@ fi healthy=0 attempt=1 while [ "$attempt" -le 30 ]; do - if curl -fsS -o /dev/null http://127.0.0.1:18088/; then + if curl -fsS -o /dev/null http://127.0.0.1:18088/serviceworker.js; then healthy=1 break fi @@ -164,7 +164,7 @@ if ! docker exec -u www-data caiwu_app php artisan storage:business-files:sync - exit 1 fi -if ! curl -fsS -o /dev/null http://127.0.0.1:18088/; then +if ! curl -fsS -o /dev/null http://127.0.0.1:18088/serviceworker.js; then restore_previous_image echo "Release failed after business storage activation; previous image was restored when available" >&2 exit 1 diff --git a/deploy/activate-release.sh b/deploy/activate-release.sh index 066acca4..db27238d 100644 --- a/deploy/activate-release.sh +++ b/deploy/activate-release.sh @@ -144,7 +144,7 @@ fi healthy=0 attempt=1 while [ "$attempt" -le 30 ]; do - if curl -fsS -o /dev/null http://127.0.0.1:18088/; then + if curl -fsS -o /dev/null http://127.0.0.1:18088/serviceworker.js; then healthy=1 break fi @@ -168,7 +168,7 @@ if ! docker exec -u www-data caiwu_app php artisan storage:business-files:sync - exit 1 fi -if ! curl -fsS -o /dev/null http://127.0.0.1:18088/; then +if ! curl -fsS -o /dev/null http://127.0.0.1:18088/serviceworker.js; then restore_previous_image echo "Release failed after business storage activation; previous image was restored when available" >&2 exit 1