diff --git a/apps/web/src/app/api/qr/[accountId]/route.ts b/apps/web/src/app/api/qr/[accountId]/route.ts index 074099d..78b2612 100644 --- a/apps/web/src/app/api/qr/[accountId]/route.ts +++ b/apps/web/src/app/api/qr/[accountId]/route.ts @@ -1,6 +1,15 @@ import { NextResponse } from "next/server"; import { db } from "@/lib/db"; +// Without these, `next build`'s "Collecting page data" pass invokes +// the GET handler in the build container — which has no +// DATABASE_URL — and the env access throws ZodError, killing the +// docker build. Marking the route force-dynamic + nodejs runtime +// tells Next to skip the build-time call and only run at request +// time. +export const dynamic = "force-dynamic"; +export const runtime = "nodejs"; + interface RouteContext { params: Promise<{ accountId: string }>; }