docs: add deployment playbooks and templates

This commit is contained in:
2026-07-19 18:02:47 +00:00 Unverified
commit b59d1df970
124 changed files with 2005 additions and 0 deletions
@@ -0,0 +1,21 @@
import { serve } from "bun";
const subsystems = ["discord"] as const;
type Subsystem = (typeof subsystems)[number];
const readiness = Object.fromEntries(subsystems.map((e) => [e, false])) as Record<Subsystem, boolean>;
serve({
port: 7000,
routes: {
"/healthz": new Response("ok"),
"/readyz": () => {
const ok = subsystems.every((key) => readiness[key]);
return Response.json({ ready: ok, subsystems: readiness }, { status: ok ? 200 : 503 });
},
},
});
export function setReady(key: Subsystem, ready = true) {
readiness[key] = ready;
}