This commit is contained in:
+5
-2
@@ -2,6 +2,9 @@
|
||||
FROM node:20-alpine AS frontend-builder
|
||||
WORKDIR /app/frontend
|
||||
|
||||
# Install build dependencies for native modules
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
# Set npm config for better performance
|
||||
RUN npm config set registry https://registry.npmjs.org/
|
||||
RUN npm config set fetch-timeout 300000
|
||||
@@ -11,8 +14,8 @@ RUN npm config set fetch-retry-maxtimeout 120000
|
||||
# Copy package files first for better caching
|
||||
COPY frontend/package*.json ./
|
||||
|
||||
# Install dependencies with specific flags for speed
|
||||
RUN npm ci --no-audit --no-fund --prefer-offline
|
||||
# Install dependencies with specific flags for speed and force rebuild
|
||||
RUN npm ci --no-audit --no-fund --prefer-offline --build-from-source
|
||||
|
||||
# Copy source code
|
||||
COPY frontend/ .
|
||||
|
||||
Reference in New Issue
Block a user