chore(ops): harden deployment and runtime setup
This commit is contained in:
parent
1d7e7c41c9
commit
c35bd5877e
30 changed files with 534 additions and 61 deletions
20
app/api/health/route.ts
Normal file
20
app/api/health/route.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { NextResponse } from "next/server";
|
||||
import { adminConfigurationStatus, appVersion, checkStorage } from "@/lib/runtime/config";
|
||||
|
||||
export async function GET() {
|
||||
let storage = "ok";
|
||||
|
||||
try {
|
||||
await checkStorage();
|
||||
} catch {
|
||||
storage = "error";
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
status: storage === "ok" ? "ok" : "error",
|
||||
version: appVersion,
|
||||
storage,
|
||||
admin: adminConfigurationStatus(),
|
||||
timestamp: new Date().toISOString(),
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue