FROM python:3.12-slim

WORKDIR /app
COPY pyproject.toml README.md ./
COPY collector ./collector
RUN pip install --no-cache-dir .
COPY configs ./configs

# The collection is written to /data; mount a host directory there so that reruns
# update the same file instead of starting over.
VOLUME /data
ENTRYPOINT ["scrape_site"]
CMD ["--config", "configs/cfpb_debt_collection.toml", \
     "--output", "/data/cfpb_debt_collection.jsonl", \
     "--report", "/data/run_report.json"]
