fix(build): disable webpack build workers to reduce memory

Next.js spawns per-worker webpack processes — each has its own heap.
On low-RAM servers total usage exceeds available memory → SIGKILL (silent).
webpackBuildWorker: false runs compilation in main process only.
Also lower JS heap cap to 512MB to leave room for OS + pnpm.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 16:21:01 +02:00
parent 1c837a3aae
commit b417eb648c
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ COPY . .
RUN pnpm prisma generate
ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_OPTIONS="--max-old-space-size=2048"
ENV NODE_OPTIONS="--max-old-space-size=512"
RUN pnpm build
# ── runner ──────────────────────────────────────────────────────────────────
+3
View File
@@ -26,6 +26,9 @@ const withPWA = withPWAInit({
const nextConfig: NextConfig = {
output: "standalone",
turbopack: {},
experimental: {
webpackBuildWorker: false,
},
};
export default withPWA(nextConfig);