FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    SERVICE_NAME=risk

WORKDIR /app

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

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

EXPOSE 8003

CMD ["uvicorn", "risk.main:app", "--host", "0.0.0.0", "--port", "8003"]
