feat: Add context7-mcp with custom Dockerfile

- Create dockerfiles/context7/Dockerfile for monorepo build
- Update docker-compose.yml to use custom Dockerfile context
- Build approach: copy all source, then pnpm install workspaces, then build:mcp
- Requires UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN env vars
- Follows AGENTS.md guidelines for Dockerfile management

Note: Monorepo structure requires full source copy before dependency resolution
to properly install workspace dependencies across packages/mcp, packages/sdk, etc.
This commit is contained in:
2026-01-21 19:39:23 -05:00
parent 3c2ee58ca1
commit a3c3358d5e
2 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
FROM node:22-alpine
# Install pnpm for monorepo
RUN npm install -g pnpm
WORKDIR /app
# Copy all source first
COPY . .
# Install all workspace dependencies (from within source tree)
RUN pnpm install
# Build MCP package specifically
RUN pnpm build:mcp
# Set entrypoint to run MCP server
ENTRYPOINT ["node", "packages/mcp/dist/index.js"]
CMD ["--transport", "stdio"]