Files
docmost-mcp/Dockerfile
Alejandro Lembke Barrientos 007c676ff2 feat: replace StdioTransport with StreamableHTTP + Node.js cluster
Integrates StreamableHTTP natively into the MCP server instead of
using StdioServerTransport. Adds Node.js cluster support so multiple
workers can handle concurrent MCP clients simultaneously.

Changes:
- src/index.ts: replace StdioServerTransport with StreamableHTTPServerTransport
  + Node.js cluster (primary forks N workers, each worker handles HTTP
  requests on :8080/mcp with a serializing mutex)
- Dockerfile: multi-stage build (node:22-slim builder + runtime)
- .gitea/workflows/docker-build.yml: CI/CD pipeline — on push to main,
  builds and pushes Docker image to gitea.p-lao.com registry

Environment variables:
- MCP_WORKERS (default: 4) — number of cluster workers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 03:15:12 +00:00

16 lines
278 B
Docker

FROM node:22-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-slim
WORKDIR /app
COPY --from=builder /app/build ./build
COPY package*.json ./
RUN npm ci --omit=dev
ENV MCP_WORKERS=4
EXPOSE 8080
CMD ["node", "build/index.js"]