Add backend pipeline Dockerfile with lightweight deps

This commit is contained in:
Min Zeya Phyo
2026-02-19 19:18:35 +08:00
parent 98af1c7cec
commit ba2c7955f4
2 changed files with 53 additions and 0 deletions

25
backend/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies for newspaper3k and psycopg2
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libxml2-dev \
libxslt1-dev \
libjpeg-dev \
zlib1g-dev \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements-pipeline.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Download NLTK data needed by newspaper3k
RUN python -c "import nltk; nltk.download('punkt_tab', quiet=True)"
# Copy application code
COPY . .
CMD ["python", "run_pipeline.py"]