This commit is contained in:
Tomas Dvorak
2026-01-26 08:13:18 +01:00
parent aa036b6550
commit dfc079288f
505 changed files with 95755 additions and 5712 deletions
+11 -2
View File
@@ -18,12 +18,18 @@ COPY . .
ENV NODE_ENV=production
# Disable ESLint during build to avoid CRA/ESLint v9 plugin incompatibilities
ENV DISABLE_ESLINT_PLUGIN=true
# Skip CRA preflight checks (peer deps, eslint presence) to prevent extra work in CI builds
ENV SKIP_PREFLIGHT_CHECK=true
# 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"
# Reduce memory footprint - cap Node heap to ~1GB to avoid OOM in constrained builders
ENV NODE_OPTIONS="--openssl-legacy-provider --max-old-space-size=1024"
# Limit webpack parallelism to reduce memory usage
ENV CI=true
# Allow build to continue even if TypeScript diagnostics exist; avoids heavy TS checks from blocking
ENV TSC_COMPILE_ON_ERROR=true
# Disable ForkTsCheckerWebpackPlugin via craco filter to further reduce memory
ENV DISABLE_TS_TYPECHECK=true
# Clean npm cache before build to free up memory
RUN npm cache clean --force 2>/dev/null || true
@@ -32,6 +38,9 @@ RUN npm cache clean --force 2>/dev/null || true
RUN --mount=type=cache,target=/root/.npm \
npm run build
RUN ls -R /app/build
# Production stage
FROM nginx:alpine