FROM python:3.13-slim

WORKDIR /app

COPY --from=ghcr.io/astral-sh/uv:0.12.3 /uv /uvx /bin/

ENV UV_COMPILE_BYTECODE=1 \
    UV_LINK_MODE=copy \
    PYTHONUNBUFFERED=1

COPY pyproject.toml uv.lock README.md ./
COPY src ./src
COPY examples ./examples
COPY policies.yaml ./policies.yaml
COPY policies.docker.yaml ./policies.docker.yaml

RUN uv sync --frozen --no-dev --all-extras

EXPOSE 8000 8001 8002

CMD ["uv", "run", "--no-sync", "uvicorn", "mcp_gate.main:app", "--host", "0.0.0.0", "--port", "8000"]
