update docker again

This commit is contained in:
2026-06-25 19:25:14 +03:30
parent 3c2bec1207
commit a7406eadaf
+10 -4
View File
@@ -10,14 +10,14 @@ WORKDIR /app
# ----------------------- # -----------------------
# Dependencies (DEV + PROD for build) # Install ALL dependencies (important for build)
# ----------------------- # -----------------------
FROM base AS deps FROM base AS deps
COPY package.json yarn.lock ./ COPY package.json yarn.lock ./
# IMPORTANT: install ALL deps (includes @nestjs/cli) # IMPORTANT: force devDependencies inclusion
RUN yarn install --frozen-lockfile 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 --from=deps /app/node_modules ./node_modules
COPY src ./src 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 \ RUN yarn build \
&& mkdir -p dist/config \ && mkdir -p dist/config \
&& cp src/config/swagger.json dist/config/ && cp src/config/swagger.json dist/config/