mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 18:52:56 +00:00
update
This commit is contained in:
+7
-6
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user