This commit is contained in:
Tomas Dvorak
2025-10-21 15:02:05 +02:00
parent 68e69e00cc
commit 63700eedb2
103 changed files with 12442 additions and 446 deletions
+12 -3
View File
@@ -1,5 +1,5 @@
# Build stage
FROM node:18-alpine as build
FROM node:18-alpine AS build
WORKDIR /app
@@ -18,8 +18,17 @@ COPY . .
ENV NODE_ENV=production
# Disable ESLint during build to avoid CRA/ESLint v9 plugin incompatibilities
ENV DISABLE_ESLINT_PLUGIN=true
# Workaround for OpenSSL error with webpack on Node 18
ENV NODE_OPTIONS=--openssl-legacy-provider
# Disable source maps to reduce memory usage
ENV GENERATE_SOURCEMAP=false
# Reduce memory footprint - use 1.5GB with smaller semi-space for better GC
ENV NODE_OPTIONS="--openssl-legacy-provider --max-old-space-size=1536"
# Limit webpack parallelism to reduce memory usage
ENV CI=true
# Clean npm cache before build to free up memory
RUN npm cache clean --force 2>/dev/null || true
# Build with memory optimization
RUN --mount=type=cache,target=/root/.npm \
npm run build