This commit is contained in:
Tomas Dvorak
2026-03-02 20:20:56 +01:00
parent dfc079288f
commit 84a8acf944
86 changed files with 3938 additions and 1289 deletions
+7 -6
View File
@@ -8,8 +8,7 @@ COPY package*.json ./
# Install dependencies with cache mount
RUN --mount=type=cache,target=/root/.npm \
npm i -g npm@10 \
&& npm ci --prefer-offline --no-audit --no-fund || npm install --no-audit --no-fund
npm ci --prefer-offline --no-audit --no-fund
# Copy source code
COPY . .
@@ -22,19 +21,21 @@ ENV DISABLE_ESLINT_PLUGIN=true
ENV SKIP_PREFLIGHT_CHECK=true
# Disable source maps to reduce memory usage
ENV GENERATE_SOURCEMAP=false
# 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"
# Reduce memory footprint - Node.js in Docker needs more conservative settings
ENV NODE_OPTIONS="--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
# Disable ForkTsCheckerWebpackPlugin via craco filter to further reduce memory
ENV DISABLE_TS_TYPECHECK=true
# Disable ESLint plugin completely
ENV ESLINT_NO_DEV_ERRORS=true
# Clean npm cache before build to free up memory
RUN npm cache clean --force 2>/dev/null || true
# Build with memory optimization
# Build with standard npm
RUN --mount=type=cache,target=/root/.npm \
npm run build