Files
Munich-news/news_crawler/Dockerfile
2025-11-11 14:22:21 +01:00

24 lines
599 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Copy requirements first for better caching
COPY news_crawler/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend config (needed for Config class)
COPY backend/config.py /app/config.py
# Copy crawler files (includes ollama_client.py)
COPY news_crawler/ /app/
# Make the scheduler executable
RUN chmod +x scheduled_crawler.py
# Set timezone to Berlin
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Run the scheduled crawler
CMD ["python", "-u", "scheduled_crawler.py"]