ceo-api/Dockerfile
valentinbvro 4372684f1b fix: correct ceo-api Dockerfile port and dependency install
EXPOSE was 3000 but main.ts defaults PORT to 3001. npm install had no
lockfile/legacy-peer-deps, which now fails on the @nestjs/swagger v8
vs @nestjs/common v11 peer conflict. Also adds .dockerignore so the
build stage's node_modules isn't clobbered by a local one.
2026-07-21 02:50:53 +02:00

15 lines
341 B
Docker

FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
COPY package.json ./
EXPOSE 3001
CMD ["node", "dist/main"]