update docker again
This commit is contained in:
+10
-4
@@ -10,14 +10,14 @@ WORKDIR /app
|
||||
|
||||
|
||||
# -----------------------
|
||||
# Dependencies (DEV + PROD for build)
|
||||
# Install ALL dependencies (important for build)
|
||||
# -----------------------
|
||||
FROM base AS deps
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
# IMPORTANT: install ALL deps (includes @nestjs/cli)
|
||||
RUN yarn install --frozen-lockfile
|
||||
# IMPORTANT: force devDependencies inclusion
|
||||
RUN yarn install --frozen-lockfile --production=false
|
||||
|
||||
|
||||
# -----------------------
|
||||
@@ -31,7 +31,13 @@ COPY package.json yarn.lock nest-cli.json tsconfig.json tsconfig.build.json ./
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY src ./src
|
||||
|
||||
# Ensure Nest CLI exists via local node_modules
|
||||
# 🔥 GUARANTEE nest CLI exists (fixes your error)
|
||||
RUN yarn add -D @nestjs/cli
|
||||
|
||||
# 🔥 SAFETY CHECK (optional but helpful)
|
||||
RUN npx nest --version
|
||||
|
||||
# Build
|
||||
RUN yarn build \
|
||||
&& mkdir -p dist/config \
|
||||
&& cp src/config/swagger.json dist/config/
|
||||
|
||||
Reference in New Issue
Block a user