# Background-jobs worker image. Build from the repo root:
#   docker build -f service/scripts/jobs-image/Dockerfile -t docker.nes.uni-due.de/inse/background-jobs:latest .
FROM python:3.13-slim

WORKDIR /app

# Headless Chrome for the bund foerderportal crawler (Selenium).
RUN apt-get update \
    && apt-get install -y --no-install-recommends chromium chromium-driver \
    && rm -rf /var/lib/apt/lists/*
ENV CHROME_BIN=/usr/bin/chromium \
    CHROMEDRIVER_PATH=/usr/bin/chromedriver

# Install dependencies 
COPY service/scripts/jobs-image/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the job code.
COPY background-jobs/app/ ./

# Keyword extraction contract shared with the service (inse.news.logic).
COPY service/src/main/inse/news/keyword_extraction.py ./keyword_extraction.py

COPY service/scripts/ ./service/scripts/
