diff --git a/Dockerfile b/Dockerfile index 9f77a338..805d28b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,11 @@ FROM migrations AS builder ARG NEXT_DEPLOYMENT_ID="unknown" ENV NEXT_DEPLOYMENT_ID="$NEXT_DEPLOYMENT_ID" -# Fix voor OOM Killer: dwing de Node-compiler om agressief op te ruimen bij 4GB RAM +# The build runs the webpack builder (see the `build` script in package.json). +# Turbopack's compiler is a single native process that grows past 12GB RSS on +# this 329-route app and gets OOM-killed; webpack peaks around 5GB. A +# --max-old-space-size cap does NOT help, because that memory is native +# Turbopack memory rather than the V8 heap. ENV NODE_OPTIONS="--max-old-space-size=4096" # Bouw de Next.js applicatie met caching diff --git a/package.json b/package.json index f1ecd9bb..af74c1f3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "packageManager": "pnpm@12.8.1", "scripts": { "dev": "pnpm assets:editor && next dev", - "build": "pnpm assets:editor && NODE_OPTIONS='--max-old-space-size=4096' next build", + "build": "pnpm assets:editor && next build --webpack", "start": "next start", "toolchain:check": "node scripts/check-node-toolchain.mjs", "lint": "biome check . || true",