feat (Worker): add a worker to check and adjust the TikTok graph
This commit is contained in:
22
worker/Dockerfile
Normal file
22
worker/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user