260228:1604 20260228:16:05 fix qnap nextjs build out-of-memory error
All checks were successful
Build and Deploy / deploy (push) Successful in 2m22s
All checks were successful
Build and Deploy / deploy (push) Successful in 2m22s
This commit is contained in:
@@ -44,9 +44,14 @@ COPY frontend/ ./frontend/
|
|||||||
ARG NEXT_PUBLIC_API_URL=https://backend.np-dms.work/api
|
ARG NEXT_PUBLIC_API_URL=https://backend.np-dms.work/api
|
||||||
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
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
|
# Build Next.js → frontend/.next/standalone
|
||||||
RUN cd frontend && pnpm run build
|
RUN cd frontend && pnpm run build
|
||||||
|
|
||||||
|
|
||||||
# =========================
|
# =========================
|
||||||
# Stage 3: Production Runtime
|
# Stage 3: Production Runtime
|
||||||
# =========================
|
# =========================
|
||||||
|
|||||||
Reference in New Issue
Block a user