feat (Worker): add a worker to check and adjust the TikTok graph

This commit is contained in:
Pierre Ryssen
2026-03-13 12:00:00 +01:00
parent 61f426ef3c
commit 4ef8913759
11 changed files with 960 additions and 52 deletions

22
worker/Dockerfile Normal file
View 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"]