# Generated by `aaa mcp init`. The MCP server over HTTP behind aaa-server's authentication.
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1
RUN useradd --system --uid 10001 --home-dir /app --create-home mcp
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
USER 10001
EXPOSE 8000
HEALTHCHECK --interval=10s --timeout=3s --retries=5 CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=2).status == 200 else 1)"
# 0.0.0.0 INSIDE the container; publish the port only to a reverse proxy that terminates TLS.
CMD ["aaa-server", "serve", "server:build", "--host", "0.0.0.0", "--port", "8000"]
