All checks were successful
Build and Push Komodo MCP Docker Image / build (push) Successful in 14s
- Switch from legacy SSE transport (sse_app) to Streamable HTTP (http_app)
- Fixes 405 Method Not Allowed for MCP clients like Gemini CLI
- MCP endpoint now at /mcp (POST) instead of /sse (GET)
- Add /health endpoint that bypasses MCP_ALLOWED_HOSTS validation
- Returns {"status": "ok"} (200) or {"status": "degraded"} (503)
- Enables Docker health checks without exposing to external hosts
- Add curl to Docker image for health checks
- Add healthcheck config to docker-compose files
- Add test-health and test-mcp Makefile targets
- Update documentation
36 lines
822 B
Docker
36 lines
822 B
Docker
# Stage 1: Builder for dependencies
|
|
FROM python:3.11-slim-bullseye AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install uv
|
|
RUN pip install uv
|
|
|
|
# Copy only dependency files first to leverage Docker cache
|
|
COPY pyproject.toml ./
|
|
|
|
# Install dependencies with uv
|
|
RUN uv pip install --system .
|
|
|
|
# Stage 2: Final image
|
|
FROM python:3.11-slim-bullseye
|
|
|
|
# Install curl for health checks
|
|
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy installed dependencies from builder
|
|
COPY --from=builder /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/
|
|
COPY --from=builder /usr/local/bin/ /usr/local/bin/
|
|
|
|
# Copy application code
|
|
COPY server.py ./
|
|
|
|
# Expose the port Uvicorn will listen on
|
|
EXPOSE 8000
|
|
|
|
# Run the server
|
|
CMD ["python", "server.py"]
|