mcnoaa-tides/Dockerfile.mcp
Ryan Malloy a02d660764 Add Starlight docs site and MCP HTTP transport
- Starlight documentation with 12 Diátaxis-organized pages covering
  getting started, how-to guides, reference, and architecture
- Docker Compose with two services: docs (Starlight/Caddy) and
  mcp (FastMCP streamable-http), both behind caddy-docker-proxy
- Env-based transport selection in server.py — stdio default preserved,
  MCP_TRANSPORT=streamable-http activates HTTP mode for Docker
- Ocean/maritime theme with dark mode default
2026-02-22 19:05:12 -07:00

28 lines
649 B
Docker

# --- Dependencies ---
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS deps
WORKDIR /app
COPY pyproject.toml uv.lock ./
COPY src/ src/
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev --no-editable
# --- Runtime ---
FROM python:3.12-slim-bookworm AS runtime
WORKDIR /app
ENV UV_COMPILE_BYTECODE=1
ENV PATH="/app/.venv/bin:$PATH"
COPY --from=deps /app/.venv /app/.venv
COPY src/ src/
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/mcp')" || exit 1
USER nobody
CMD ["mcnoaa-tides"]