fix (worker): correct crash of the worker
This commit is contained in:
@@ -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"]
|
||||
Reference in New Issue
Block a user