FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    SERVICE_NAME=gateway

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/gateway /app/services/gateway
RUN pip install --no-cache-dir /app/services/gateway

EXPOSE 8000

CMD ["uvicorn", "gateway.main:app", "--host", "0.0.0.0", "--port", "8000"]
