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.
This commit is contained in:
valentinbvro 2026-07-21 19:18:59 +02:00
parent 064a1cb4b5
commit 7518682171
4 changed files with 4679 additions and 5 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
node_modules
dist
.git
.env
*.log

View file

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

4668
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -16,5 +16,6 @@
"strictNullChecks": true, "strictNullChecks": true,
"noImplicitAny": true, "noImplicitAny": true,
"esModuleInterop": true "esModuleInterop": true
} },
"include": ["src/**/*.ts"]
} }