mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-18 12:46:32 +02:00
fix(docker): resolve exit code 1 OOM in nextjs build by limiting workers and memory, ignoring eslint
This commit is contained in:
1 parent
d855bda5cd
commit
cc40133ad1
3 files changed
+72
-1
No files matched your search
+4
-1
@@ -1,4 +1,4 @@
|
||||
FROM node:18-alpine AS base
|
||||
FROM node:20-alpine AS base
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM base AS deps
|
||||
@@ -18,6 +18,9 @@ COPY . .
|
||||
|
||||
# Next.js telemetry is disabled
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
# Limit workers and increase memory to prevent OOM
|
||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||
ENV NEXT_PRIVATE_WORKER_THREADS=0
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Reference in new issue
Block a user