This commit is contained in:
+4
-1
@@ -18,7 +18,9 @@ WORKDIR /app
|
||||
FROM base AS deps
|
||||
WORKDIR /temp-deps
|
||||
COPY package*.json ./
|
||||
RUN npm ci --ignore-scripts --no-fund --no-audit
|
||||
# Force dev deps even when the deploy platform sets NODE_ENV=production at build time
|
||||
ENV NODE_ENV=development
|
||||
RUN npm ci --include=dev --ignore-scripts --no-fund --no-audit
|
||||
|
||||
# Stage 3: Production dependencies only
|
||||
FROM base AS prod-deps
|
||||
@@ -29,6 +31,7 @@ RUN npm ci --omit=dev --ignore-scripts --no-fund --no-audit
|
||||
# Stage 4: Build
|
||||
FROM base AS builder
|
||||
WORKDIR /build
|
||||
ENV NODE_ENV=development
|
||||
COPY package*.json ./
|
||||
COPY --from=deps /temp-deps/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user