Increase max old space size for npm builds
This commit is contained in:
@@ -20,6 +20,7 @@ RUN find public/fonts -name "*.ttf" ! -name "*Regular.ttf" ! -name "*Bold.ttf" !
|
|||||||
|
|
||||||
RUN npm cache clean --force && \
|
RUN npm cache clean --force && \
|
||||||
NODE_OPTIONS="--max-old-space-size=2048" npm run build
|
NODE_OPTIONS="--max-old-space-size=2048" npm run build
|
||||||
|
NODE_OPTIONS="--max-old-space-size=4096" npm run build
|
||||||
|
|
||||||
# Stage 3: Build backend
|
# Stage 3: Build backend
|
||||||
FROM deps AS backend-builder
|
FROM deps AS backend-builder
|
||||||
@@ -30,6 +31,7 @@ COPY . .
|
|||||||
RUN npm rebuild better-sqlite3 --force
|
RUN npm rebuild better-sqlite3 --force
|
||||||
|
|
||||||
RUN npm run build:backend
|
RUN npm run build:backend
|
||||||
|
RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build:backend
|
||||||
|
|
||||||
# Stage 4: Production dependencies only
|
# Stage 4: Production dependencies only
|
||||||
FROM node:22-slim AS production-deps
|
FROM node:22-slim AS production-deps
|
||||||
@@ -80,3 +82,4 @@ RUN chmod +x /entrypoint.sh
|
|||||||
USER node
|
USER node
|
||||||
|
|
||||||
CMD ["/entrypoint.sh"]
|
CMD ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user