diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cbca873 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +**/node_modules +**/dist +.git +.env +.env.* +*.log diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a257e45..06bcbb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: - run: npm run typecheck - run: npm run build - run: npm pack --workspace mcp-server --dry-run + - run: docker build -t corpus-mcp . - run: node scripts/check-plugin-package.mjs - uses: actions/setup-python@v5 with: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dcb97b5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# Corpus MCP server (stdio). A thin client of the hosted server at +# corpuslaw.us: every MCP request is forwarded there, so the container needs +# outbound HTTPS and nothing else. No API key is required to start it or to +# list tools; set CORPUS_API_KEY for higher search limits. +# +# docker build -t corpus-mcp . +# docker run -i --rm corpus-mcp +FROM node:22-alpine AS build +WORKDIR /app +COPY package.json package-lock.json ./ +COPY mcp-server/package.json mcp-server/ +RUN npm ci --workspace mcp-server --include-workspace-root=false +COPY tsconfig.base.json ./ +COPY mcp-server/tsconfig.json mcp-server/ +COPY mcp-server/src mcp-server/src +RUN npm run build --workspace mcp-server + +# The server has no runtime dependencies, so the final image is just the +# compiled output on a clean Node. +FROM node:22-alpine +WORKDIR /app +ENV NODE_ENV=production +COPY --from=build /app/mcp-server/package.json ./ +COPY --from=build /app/mcp-server/dist ./dist +USER node +ENTRYPOINT ["node", "dist/index.js"] diff --git a/glama.json b/glama.json new file mode 100644 index 0000000..abf1596 --- /dev/null +++ b/glama.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://glama.ai/mcp/schemas/server.json", + "maintainers": ["teakesdev"] +}