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