File size: 724 Bytes
2ec0785
 
 
 
 
 
 
 
 
 
5f641ae
 
 
 
 
 
2ec0785
 
 
5f641ae
 
 
 
 
 
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
FROM node:22-bookworm

# Install system dependencies for Chromium (not Chromium itself — Playwright bundles its own)
RUN apt-get update && apt-get install -y --no-install-recommends \
    libnss3 libnspr4 libatk-bridge2.0-0 libatk1.0-0 libcups2 libdrm2 \
    libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
    libgbm1 libpango-1.0-0 libcairo2 libasound2 libatspi2.0-0 \
    libwayland-client0 libwayland-cursor0 libwayland-egl1 \
    ca-certificates fonts-liberation \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY package.json .
RUN npm install

# Install Playwright's bundled Chromium browser
RUN npx playwright install chromium

COPY . .

ENV PORT=7860
EXPOSE 7860

CMD ["node", "server.js"]