File size: 838 Bytes
fe40579
839390f
 
 
 
 
a02e7e7
 
5fa7575
839390f
a02e7e7
839390f
fe40579
 
 
 
 
 
 
 
 
 
 
 
839390f
 
 
 
 
 
a02e7e7
 
 
 
fe40579
 
a02e7e7
839390f
fe40579
 
 
839390f
 
a02e7e7
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:22-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    git \
    wget \
    gnupg \
    ffmpeg \
    ca-certificates \
    apt-transport-https \
    xvfb \
    libnss3 \
    libatk-bridge2.0-0 \
    libdrm2 \
    libxcomposite1 \
    libxdamage1 \
    libxrandr2 \
    libgbm1 \
    libxkbcommon0 \
    libasound2 \
    libpango-1.0-0 \
    libcairo2 \
    libatspi2.0-0 \
    && rm -rf /var/lib/apt/lists/*

RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444 \
    --mount=type=secret,id=GITHUB_REPO,mode=0444 \
    git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/$(cat /run/secrets/GITHUB_REPO).git /app

COPY package*.json ./

RUN npm install

RUN npx playwright install chromium

COPY . .

ENV PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright
ENV DISPLAY=:99

EXPOSE 7860

CMD ["npm", "start"]