From f3c6f1c88955d8650950b932cf46e578bbc90a47 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 28 Feb 2026 16:04:32 +0700 Subject: [PATCH] 260228:1604 20260228:16:05 fix qnap nextjs build out-of-memory error --- frontend/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index ddd85cf..a6be495 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -44,9 +44,14 @@ COPY frontend/ ./frontend/ ARG NEXT_PUBLIC_API_URL=https://backend.np-dms.work/api ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL} +# Prevent OOMs during build by limiting Node memory to 2GB and disabling telemetry +ENV NODE_OPTIONS="--max-old-space-size=2048" +ENV NEXT_TELEMETRY_DISABLED=1 + # Build Next.js → frontend/.next/standalone RUN cd frontend && pnpm run build + # ========================= # Stage 3: Production Runtime # =========================