| name | maintainx-deploy-integration |
| description | Deploy MaintainX integrations to production environments.
Use when deploying to cloud platforms, configuring production environments,
or automating deployment pipelines for MaintainX integrations.
Trigger with phrases like "deploy maintainx", "maintainx deployment",
"maintainx cloud deploy", "maintainx kubernetes", "maintainx docker".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(docker:*), Bash(kubectl:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","maintainx","deployment","docker","kubernetes"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
MaintainX Deploy Integration
Overview
Deploy MaintainX integrations to production using Docker, Google Cloud Run, and Kubernetes with proper health checks and secret management.
Prerequisites
- MaintainX integration tested and passing CI
- Docker installed
- Cloud platform account (GCP recommended)
MAINTAINX_API_KEY for production environment
Instructions
Step 1: Dockerfile
# Dockerfile
FROM node:20-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --production=false
COPY tsconfig.json ./
COPY src/ ./src/
RUN npm run build
FROM node:20-slim
WORKDIR /app
RUN addgroup --system app && adduser --system --ingroup app app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY package*.json ./
USER app
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
CMD ["node", "dist/index.js"]
Step 2: Health Check Endpoint
import express from 'express';
import { MaintainXClient } from './client';
const app = express();
app.get('/health', async (req, res) => {
const checks: Record<string, string> = {
server: 'ok',
apiKey: process.env.MAINTAINX_API_KEY ? 'configured' : 'missing',
};
try {
const client = new MaintainXClient();
await client.getUsers({ : });
checks. = ;
} (: ) {
checks. = ;
}
allOk = .(checks).( v === || v === );
res.(allOk ? : ).({
: allOk ? : ,
checks,
: process.(),
: ().(),
});
});
app.(, {
res.(process.. ? : ).({
: !!process..,
});
});
{ app };