release(v2.7.3): tenant SQL scoping, spoof-proof rate limits, safe fraud demo, non-root Docker & full parity

This commit is contained in:
Amirul Islam Redwan71
2026-11-27 04:47:06 +06:00
parent c827fdfee6
commit a3392ae69f
65 changed files with 911 additions and 1228 deletions
+21 -10
View File
@@ -1,24 +1,35 @@
FROM node:20-alpine
FROM node:20-alpine AS builder
WORKDIR /build
COPY package*.json tsconfig.json ./
RUN npm ci --no-audit --no-fund
COPY src ./src
RUN npm run build
FROM node:20-alpine AS runtime
WORKDIR /app
# Install deps (incl. dev deps for the TypeScript build)
COPY package*.json tsconfig.json ./
RUN npm install --no-audit --no-fund
# Grant non-root node binary permission to bind port 80 cleanly on any container runtime
RUN apk add --no-cache libcap && setcap 'cap_net_bind_service=+ep' /usr/local/bin/node
# Source + web, static assets and simulator
COPY src ./src
COPY package*.json ./
RUN npm ci --omit=dev --ignore-scripts --no-audit --no-fund && npm cache clean --force
COPY --from=builder /build/dist ./dist
COPY assets ./assets
COPY configs ./configs
COPY README.md index.html guide.html health.html privacy.html terms.html mcp_explorer.html simulator.html ./
RUN npm run build
RUN chown -R node:node /app
USER node
ENV NODE_ENV=production
# Listen on 80 so it matches the existing app/proxy port (no label change needed)
ENV PORT=80
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 CMD wget -qO- http://127.0.0.1:80/health || exit 1
# Remote HTTP MCP endpoint: GET / = landing, POST /mcp = MCP.
# The npm/npx build stays STDIO (dist/index.js, unchanged).
CMD ["node", "dist/http.js"]