# Much simpler than the old prototype's image: the EXL AI Gateway now owns model routing,
# PII guardrails, caching and observability, so there's no local litellm proxy or Presidio
# side-service to bundle — this container is just the Python app and the OpenAI SDK client
# that talks out to the gateway (see model_client.py).
FROM public.ecr.aws/docker/library/python:3.12-slim

WORKDIR /app

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

COPY agent_core.py local_api.py model_client.py evidence_store.py retrieval.py schemas.py /app/
COPY workspace.html /app/
COPY knowledge_base/ /app/knowledge_base/

EXPOSE 8080
# Loopback by default on a laptop; App Runner's health check comes from outside the
# container, so the bind address must be explicit here — see model_client.py's own note on
# the same lesson from the earlier build (a loopback bind can never pass App Runner's check).
ENV BIND_HOST=0.0.0.0
CMD ["python3", "local_api.py", "--port", "8080"]
