修复生产发布健康探针 (#188)

使用容器已声明的公开静态资源执行发布健康检查,避免根路径被 Laravel 防火墙拒绝后误回滚。
This commit is contained in:
limeng 2026-09-15 11:53:17 +08:00
parent 9dbdef5e2e
commit 7146b19bd3
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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