Env Update
Backend Image / build-and-push (push) Successful in 3m8s
Frontend Image / build-and-push (push) Successful in 2m24s

This commit is contained in:
Nick Szaunig committed 2026-08-27 08:32:47 +02:00
1 parent f2b9993427
commit 9282777ac9
9 files changed
+60 -21

No files matched your search

@@ -0,0 +1,17 @@
import { NextResponse } from 'next/server';
// Server-only env var (no NEXT_PUBLIC_ prefix), so it is NOT inlined into the
// client bundle at build time. force-dynamic makes Next.js read process.env
// fresh on every request instead of caching this route's output, so a single
// built image can be promoted across environments and reconfigured purely via
// the container's runtime env (e.g. a Kubernetes ConfigMap) without rebuilding.
export const dynamic = 'force-dynamic';
export interface RuntimeConfig {
apiUrl: string;
}
export function GET(): NextResponse<RuntimeConfig> {
const apiUrl = process.env.API_URL ?? 'http://localhost:3001/api/v1';
return NextResponse.json({ apiUrl });
}