feat: add HTTP transport for Docker proxy support
Adds src/http-server.ts for Streamable HTTP transport, enabling the law-mcp-proxy to route requests to this MCP via Docker network. Endpoints: GET /health, POST /mcp, GET /mcp, DELETE /mcp Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
# Auto-generated Dockerfile for Law MCP HTTP transport.
|
||||
# Built by rollout-http-transport.sh from Ansvar-Architecture-Documentation.
|
||||
|
||||
# ── Stage 1: Build ──────────────────────────────────────────────────────
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --ignore-scripts
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN npm run build
|
||||
|
||||
# ── Stage 2: Production ────────────────────────────────────────────────
|
||||
FROM node:20-alpine AS production
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev --ignore-scripts
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY data/database.db ./data/database.db
|
||||
|
||||
# Security: non-root user
|
||||
RUN addgroup -S nodejs && adduser -S nodejs -G nodejs
|
||||
USER nodejs
|
||||
|
||||
ENV NODE_ENV=production
|
||||
CMD ["node", "dist/src/http-server.js"]
|
||||
Reference in New Issue
Block a user