ceo-worker/Dockerfile
valentinbvro 7518682171 fix: apply ceo-api's Dockerfile/tsconfig fixes to ceo-worker
Same two bugs found deploying ceo-api: npm ci needs --include=dev in
the build stage (Coolify exposes NODE_ENV=production at build time,
which makes npm skip devDependencies otherwise), and tsconfig needs an
explicit include filter to keep nest build's output at dist/main.js.
2026-07-21 19:18:59 +02:00

14 lines
351 B
Docker

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