From a7784bcc3ff805a713186f0baa1f4deb74de2941 Mon Sep 17 00:00:00 2001 From: ajnasnb Date: Sun, 9 Aug 2026 09:11:40 +0530 Subject: [PATCH] chore: add reproducible Glama MCP build --- Dockerfile | 15 +++++++++++++++ glama.json | 6 ++++++ test/glama-config.test.js | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 Dockerfile create mode 100644 glama.json create mode 100644 test/glama-config.test.js diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0e6ec6c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:24-bookworm-slim + +ENV NODE_ENV=production +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm ci --omit=dev --ignore-scripts + +COPY bin ./bin +COPY src ./src +COPY schemas ./schemas +COPY LICENSE NOTICE THIRD_PARTY_NOTICES.md ./ + +USER node +CMD ["node", "bin/qarinah.js", "mcp"] diff --git a/glama.json b/glama.json new file mode 100644 index 0000000..256ecd4 --- /dev/null +++ b/glama.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://glama.ai/mcp/schemas/server.json", + "maintainers": [ + "AjnasNB" + ] +} diff --git a/test/glama-config.test.js b/test/glama-config.test.js new file mode 100644 index 0000000..636fcdc --- /dev/null +++ b/test/glama-config.test.js @@ -0,0 +1,24 @@ +import assert from "node:assert/strict"; +import { readFile } from "node:fs/promises"; +import path from "node:path"; +import test from "node:test"; +import { fileURLToPath } from "node:url"; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); + +test("Glama metadata identifies the repository maintainer", async () => { + const manifest = JSON.parse(await readFile(path.join(root, "glama.json"), "utf8")); + assert.deepEqual(manifest, { + $schema: "https://glama.ai/mcp/schemas/server.json", + maintainers: ["AjnasNB"] + }); +}); + +test("the Glama container starts the diagnostic-only stdio MCP server", async () => { + const dockerfile = await readFile(path.join(root, "Dockerfile"), "utf8"); + assert.match(dockerfile, /^FROM node:24-bookworm-slim$/m); + assert.match(dockerfile, /^RUN npm ci --omit=dev --ignore-scripts$/m); + assert.match(dockerfile, /^USER node$/m); + assert.match(dockerfile, /^CMD \["node", "bin\/qarinah\.js", "mcp"\]$/m); + assert.doesNotMatch(dockerfile, /--allow-query/); +});