-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 742 Bytes
/
Dockerfile
File metadata and controls
33 lines (26 loc) · 742 Bytes
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
FROM python:3.12-slim
LABEL version="1.2.0"
WORKDIR /app
# System deps for lxml (HTML/XML parsing)
RUN apt-get update && apt-get install -y --no-install-recommends \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml .
RUN pip install --no-cache-dir \
"fastapi>=0.115" \
"uvicorn[standard]>=0.32" \
"pydantic>=2.10" \
"httpx>=0.28" \
"beautifulsoup4>=4.12" \
"lxml>=5.3" \
"trafilatura>=2.0" \
"python-dateutil>=2.9" \
"playwright>=1.49" \
"python-multipart>=0.0.18"
# Install Chromium for full JS rendering support (React/Vue/Angular pages)
RUN playwright install chromium --with-deps
COPY app.py .
EXPOSE 8000
CMD ["python", "app.py"]