mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-10 22:32:16 +02:00
feat(mcp): add Dockerfile for remote streamable-http deployment
This commit is contained in:
parent
6b204a2f8c
commit
d09ecd16c9
2 changed files with 43 additions and 0 deletions
11
surfsense_mcp/.dockerignore
Normal file
11
surfsense_mcp/.dockerignore
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.git
|
||||
.gitignore
|
||||
.venv
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
.pytest_cache/
|
||||
.ruff_cache/
|
||||
.env
|
||||
tests/
|
||||
32
surfsense_mcp/Dockerfile
Normal file
32
surfsense_mcp/Dockerfile
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# syntax=docker.io/docker/dockerfile:1
|
||||
# SurfSense MCP Server — remote (streamable-http) image.
|
||||
# Serves /mcp (per-request API key, no baked secret) and a public /health probe.
|
||||
|
||||
# Stage 1: deps frozen from uv.lock so rebuilds never drift.
|
||||
FROM python:3.12-slim AS deps
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN pip install --no-cache-dir uv && \
|
||||
uv export --frozen --no-dev --no-emit-project --no-hashes \
|
||||
--format requirements-txt -o /tmp/requirements.txt && \
|
||||
uv pip install --system --no-cache-dir -r /tmp/requirements.txt && \
|
||||
rm /tmp/requirements.txt
|
||||
|
||||
|
||||
# Stage 2: project source; --no-deps since deps are already installed above.
|
||||
FROM deps AS production
|
||||
|
||||
COPY . .
|
||||
RUN uv pip install --system --no-cache-dir --no-deps -e .
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
SURFSENSE_MCP_TRANSPORT=streamable-http \
|
||||
SURFSENSE_MCP_HOST=0.0.0.0 \
|
||||
SURFSENSE_MCP_PORT=8080 \
|
||||
SURFSENSE_BASE_URL=https://api.surfsense.com
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["python", "-m", "surfsense_mcp"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue