This commit is contained in:
+10
-4
@@ -4,7 +4,8 @@ FROM node:22-alpine AS base
|
||||
ENV TZ=Asia/Tehran
|
||||
|
||||
# Runflare build hosts cannot reach registry.npmjs.org; use their npm mirror.
|
||||
RUN npm install -g pnpm@9.15.9 --registry=https://mirror-npm.runflare.com
|
||||
# RUN npm install -g pnpm@9.15.9 --registry=https://mirror-npm.runflare.com
|
||||
RUN npm install -g pnpm@9.15.9
|
||||
|
||||
# Stage 2: Install all dependencies (including dev)
|
||||
FROM base AS deps
|
||||
@@ -13,8 +14,11 @@ COPY package.json pnpm-lock.yaml ./
|
||||
# Runflare injects NODE_ENV=production globally, which skips devDependencies.
|
||||
# @nestjs/cli and typescript are required for the build step.
|
||||
ENV NODE_ENV=development
|
||||
# RUN pnpm install --frozen-lockfile --loglevel info \
|
||||
# --registry=https://mirror-npm.runflare.com
|
||||
|
||||
RUN pnpm install --frozen-lockfile --loglevel info \
|
||||
--registry=https://mirror-npm.runflare.com
|
||||
|
||||
|
||||
# Stage 3: Build
|
||||
FROM base AS builder
|
||||
@@ -27,8 +31,10 @@ RUN if grep -q '"build":' package.json; then pnpm run build; fi
|
||||
FROM base AS prod-deps
|
||||
WORKDIR /temp-deps
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --prod --frozen-lockfile --loglevel info \
|
||||
--registry=https://mirror-npm.runflare.com
|
||||
# RUN pnpm install --prod --frozen-lockfile --loglevel info \
|
||||
# --registry=https://mirror-npm.runflare.com
|
||||
RUN pnpm install --prod --frozen-lockfile --loglevel info
|
||||
|
||||
|
||||
# Stage 5: Runner
|
||||
FROM base AS runner
|
||||
|
||||
Reference in New Issue
Block a user