From ca0ec016f97a9f8c920bef43e83a08658170fc83 Mon Sep 17 00:00:00 2001 From: claude_dev Date: Sat, 1 Aug 2026 21:07:34 +0800 Subject: [PATCH] =?UTF-8?q?ci(nas-verify):=20=E5=8A=A0=20/health=20gate=20?= =?UTF-8?q?=E9=98=B2=E5=AD=98=E6=B4=BB=E6=8E=A2=E9=92=88=E5=9B=9E=E5=BD=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /health 是 Docker HEALTHCHECK 依赖端点,后端漏实现致容器恒unhealthy (a17f291 已补端点)。nas-verify 加 gate:/health 非200→CI 红灯,防漏部署/被改坏。 public 端点无需 token,$BASE 已是 http://192.168.2.154:8000。 反馈: 前后端 session --- .gitea/workflows/ci-cd.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index aac76c2..3571b3e 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -85,6 +85,10 @@ jobs: [ "$code" = "200" ] || { echo "❌ strategy/list HTTP $code"; exit 1; } [ -s /tmp/sl.json ] || { echo "❌ strategy/list 空响应"; exit 1; } echo "✅ strategy/list 200 非空, 后端路由通" + # /health 存活探针(Docker HEALTHCHECK 依赖;漏部署→容器恒unhealthy,本次回归即此) + code=$(curl -s -o /dev/null -w "%{http_code}" $BASE/health) + [ "$code" = "200" ] || { echo "❌ /health HTTP $code (容器会unhealthy)"; exit 1; } + echo "✅ /health 200, 存活探针通" - name: NAS 副本数据可读(dbbardata) run: | ssh sanguo-nas "python3 -c 'import sqlite3