riazmo commited on
Commit
5e3d972
·
verified ·
1 Parent(s): 9652854

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +66 -0
Dockerfile ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install ALL Chromium dependencies explicitly
6
+ RUN apt-get update && apt-get install -y \
7
+ wget \
8
+ gnupg \
9
+ curl \
10
+ # Core libraries for Chromium
11
+ libnss3 \
12
+ libnspr4 \
13
+ libatk1.0-0 \
14
+ libatk-bridge2.0-0 \
15
+ libcups2 \
16
+ libdrm2 \
17
+ libdbus-1-3 \
18
+ libxkbcommon0 \
19
+ libxcomposite1 \
20
+ libxdamage1 \
21
+ libxfixes3 \
22
+ libxrandr2 \
23
+ libgbm1 \
24
+ libasound2 \
25
+ libpango-1.0-0 \
26
+ libpangocairo-1.0-0 \
27
+ libcairo2 \
28
+ libatspi2.0-0 \
29
+ libxshmfence1 \
30
+ libglib2.0-0 \
31
+ libx11-6 \
32
+ libx11-xcb1 \
33
+ libxcb1 \
34
+ libxext6 \
35
+ libxrender1 \
36
+ libxtst6 \
37
+ fonts-liberation \
38
+ libappindicator3-1 \
39
+ libnss3-tools \
40
+ xdg-utils \
41
+ libgdk-pixbuf2.0-0 \
42
+ libgtk-3-0 \
43
+ libxss1 \
44
+ && rm -rf /var/lib/apt/lists/*
45
+
46
+ # Copy requirements first for caching
47
+ COPY requirements.txt .
48
+
49
+ # Install Python dependencies
50
+ RUN pip install --no-cache-dir -r requirements.txt
51
+
52
+ # Set Playwright browser path and install browsers
53
+ ENV PLAYWRIGHT_BROWSERS_PATH=/app/.playwright-browsers
54
+ RUN python -m playwright install chromium
55
+
56
+ # Copy application files
57
+ COPY . .
58
+
59
+ # Create data directories
60
+ RUN mkdir -p /app/data/figma /app/data/website /app/data/comparisons /app/reports
61
+
62
+ # Expose port
63
+ EXPOSE 7860
64
+
65
+ # Run the app
66
+ CMD ["python", "app.py"]