| 123456789101112131415161718192021222324252627 |
- FROM node:22-slim
- # Install FFmpeg + wget (for thumbnail generation and healthcheck)
- RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg wget ca-certificates && rm -rf /var/lib/apt/lists/*
- WORKDIR /app
- # Copy package files and install
- COPY packages/api/package*.json ./
- COPY packages/api/prisma ./prisma
- COPY packages/api/tsconfig.json ./
- RUN npm install && npx prisma generate
- # Copy source code
- COPY packages/api/src ./src
- # Build TypeScript
- RUN npx tsc -p tsconfig.json
- # Copy the workers JS into dist (NOT compiled — pure JS, runs in forked child)
- COPY packages/api/src/workers ./dist/workers
- EXPOSE 3001
- ENV NODE_ENV=production
- CMD ["node", "dist/index.js"]
|