File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -52,31 +52,30 @@ WORKDIR /app
5252# Install pnpm globally
5353RUN npm install -g pnpm
5454
55- # Copy package.json first
55+ # Copy root package.json and the entire apps directory
5656COPY package*.json ./
57+ COPY apps ./apps
58+
59+ # Set working directory to the API folder
60+ WORKDIR /app/apps/api
5761
5862# Install dependencies
5963RUN npm install --legacy-peer-deps
6064
6165# Install global NestJS CLI
6266RUN npm install -g @nestjs/cli@$(node -p "require('./package.json').devDependencies['@nestjs/cli'].replace('^', '')" )
6367
64- # Copy source code
65- COPY src ./src
66- COPY tsconfig*.json ./
67- COPY nest-cli.json ./
68-
6968# Build the application
7069RUN npm run build
7170
7271# Production stage
7372FROM node:18-alpine AS production
7473
75- WORKDIR /app
74+ WORKDIR /app/apps/api
7675
77- COPY --from=base /app/package*.json ./
78- COPY --from=base /app/node_modules ./node_modules
79- COPY --from=base /app/dist ./dist
76+ COPY --from=base /app/apps/api/ package*.json ./
77+ COPY --from=base /app/apps/api/ node_modules ./node_modules
78+ COPY --from=base /app/apps/api/ dist ./dist
8079
8180EXPOSE 3000
8281
You can’t perform that action at this time.
0 commit comments