This repository was archived by the owner on Oct 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (47 loc) · 1.24 KB
/
Dockerfile
File metadata and controls
59 lines (47 loc) · 1.24 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies required for Playwright
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
wget \
gnupg \
libnss3 \
libatk-bridge2.0-0 \
libdrm2 \
libxss1 \
libgtk-3-0 \
libxrandr2 \
libasound2 \
libpangocairo-1.0-0 \
libatk1.0-0 \
libcairo-gobject2 \
libgtk-3-0 \
libgdk-pixbuf-2.0-0 \
libgbm1 \
fonts-unifont \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Install Playwright browsers
RUN playwright install chromium
# Copy application code
COPY src/ ./src/
#COPY config.example.json ./
# Create templates directory and copy templates
RUN mkdir -p src/templates
COPY src/templates/ ./src/templates/
# Create data directory for logs/state
RUN mkdir -p /app/data
# Set Python path
ENV PYTHONPATH=/app
# Expose port
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1
# Run the application
CMD ["python", "-m", "src.main"]