-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile.bot
More file actions
30 lines (24 loc) · 1.84 KB
/
Dockerfile.bot
File metadata and controls
30 lines (24 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# ─── image with browsers already installed ──────────────────────────────
FROM mcr.microsoft.com/playwright:v1.52.0-noble
ARG CACHEBUST=1
WORKDIR /app
# ─── root deps & shared config ──────────────────────────────────────────
COPY tsconfig.base.json ./
COPY package*.json ./
COPY auth.json ./auth.json
# ─── bot deps ───────────────────────────────────────────────────────────
COPY src/bot/package*.json ./src/bot/
COPY src/bot/tsconfig.json ./src/bot/
# ─── source code ────────────────────────────────────────────────────────
COPY src ./src
# ─── Prisma schema (same one the backend uses) ──────────────────────────
COPY src/backend/schema.prisma ./prisma/
# ─── install & generate client ──────────────────────────────────────────
RUN npm ci \
&& npm ci --prefix ./src/bot \
&& npx prisma generate # ← generates node_modules/.prisma
# ─── build TS ───────────────────────────────────────────────────────────
RUN echo "🔧 CACHEBUST=$CACHEBUST – building bot…" \
&& npx tsc --project src/bot/tsconfig.json --pretty false \
&& echo "✅ build done; index.js ⇒" && ls -l dist/bot/index.js
CMD ["xvfb-run", "-a", "node", "dist/bot/index.js"]