fix (worker): correct crash of the worker

This commit is contained in:
Pierre Ryssen
2026-03-30 11:34:05 +02:00
parent 0a8e161c8d
commit 1a066e14df
2 changed files with 4 additions and 7 deletions

View File

@@ -2,21 +2,18 @@ FROM node:20-alpine
WORKDIR /app
# Copie les fichiers nécessaires
COPY package*.json ./
COPY prisma.config.ts ./
COPY prisma ./prisma/
COPY tsconfig.json ./
# Install deps
RUN npm ci
# Génère le client Prisma dans app/generated/prisma (output défini dans schema.prisma)
RUN npx prisma generate
# Copie le code du worker ET le client Prisma généré
COPY worker ./worker/
COPY app/generated ./app/generated/
# Lance le worker avec tsx
CMD ["npx", "tsx", "worker/snapshot-worker.ts"]
RUN npm install -g tsx
CMD ["tsx", "worker/snapshot-worker.ts"]