From c031fbb517534cf5123b21ee77b82856f7b743b3 Mon Sep 17 00:00:00 2001 From: reoring Date: Mon, 19 Oct 2026 00:11:48 +0900 Subject: [PATCH] fix: serve a static /healthz for the platform startup/liveness probes appthrust/platform#5029 (2026-10-11) made the nextjs-postgres template probe GET /healthz for startup and liveness, based on appthrust/sample-nextjs#2, but apps are generated from this template, which had no such route. Every app created from it since then was killed on its startup-probe 404 every two minutes and never became Ready (appthrust.ink facility-inspection-map-2, 2026-10-18). /healthz is static and database-independent on purpose. --- README.md | 4 ++++ app/healthz/route.ts | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 app/healthz/route.ts diff --git a/README.md b/README.md index ccb2a61..e0fcbb8 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,7 @@ Run locally: npm install npm run dev ``` + +## Platform health probes + +The platform probes `GET /healthz` for startup and liveness, and `GET /` for readiness. Keep `/healthz` static and database-independent so startup and liveness do not depend on database availability. diff --git a/app/healthz/route.ts b/app/healthz/route.ts new file mode 100644 index 0000000..1a64c6e --- /dev/null +++ b/app/healthz/route.ts @@ -0,0 +1,4 @@ +export const dynamic = "force-static"; +export function GET() { + return new Response("ok", { status: 200, headers: { "Content-Type": "text/plain; charset=utf-8" } }); +}