From a7406eadaff31ba1ca35e9596abc6d926ef7a740 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Thu, 25 Jun 2026 19:25:14 +0330 Subject: [PATCH] update docker again --- Dockerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 67ea259..569c9b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/