FROM python:3.12-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    curl ca-certificates && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt

COPY wsp/ /app/wsp/
COPY credentials/50076FB3826FADA540ACFB19.p12 /app/credentials/

ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1

# Default: run incremental for all feeds. Override with `command` in compose.
CMD ["python", "-m", "wsp.runner", "incremental", "all"]
