# Build from the repository root so the shared package is in context:
#   docker build -f services/reporting/Dockerfile -t as0558844/reporting .
FROM python:3.12-slim

WORKDIR /app

# shared first (the traceability spine), then the service itself
COPY shared /app/shared
RUN pip install --no-cache-dir /app/shared

COPY services/reporting /app/services/reporting
RUN pip install --no-cache-dir /app/services/reporting

ENV SERVICE_NAME=reporting \
    ARTIFACT_DIR=/app/artifacts \
    PYTHONUNBUFFERED=1

EXPOSE 8005

CMD ["uvicorn", "reporting.main:app", "--host", "0.0.0.0", "--port", "8005"]
