Optimized on docker build

This commit is contained in:
Umar Adilov 2025-05-10 18:07:11 +05:00
parent 6dd88f897c
commit edb39d5538

View File

@ -7,10 +7,18 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
ENV CI=true
WORKDIR /app
# Copy package.json and pnpm-lock.yaml first for caching
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install
# Copy the rest of the files
COPY . .
# Install dependencies and build
RUN pnpm install && pnpm build
# Build the application
RUN pnpm build
FROM node:18-alpine AS runner