Docker Deployment (Ops)
Docker Deployment (Ops)
Section titled “Docker Deployment (Ops)”Using Pre-built Image
Section titled “Using Pre-built Image”docker run -p 3000:3000 blackmesa/workflow-mcpWith Persistent Storage
Section titled “With Persistent Storage”docker run -p 3000:3000 \ -v ./workflow-data:/data \ -e MCP_WORKSPACE_DIR=/data \ workflow-mcpDocker Compose
Section titled “Docker Compose”Create docker-compose.yml:
version: '3.8'
services: workflow-mcp: build: . ports: - "3000:3000" environment: - MCP_PORT=3000 - MCP_HOST=0.0.0.0 - MCP_WORKSPACE_DIR=/data - CORS_ORIGINS=* volumes: - workflow-data:/data healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/health"] interval: 30s timeout: 10s retries: 3
volumes: workflow-data:Run with:
docker-compose up -dWith OAuth
Section titled “With OAuth”services: workflow-mcp: # ... other config ... environment: - MCP_OAUTH_ENABLED=true - GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID} - GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}Create .env:
GITHUB_CLIENT_ID=your_client_idGITHUB_CLIENT_SECRET=your_client_secretMulti-Architecture Build
Section titled “Multi-Architecture Build”Build for multiple platforms:
docker buildx build \ --platform linux/amd64,linux/arm64 \ -t blackmesa/workflow-mcp:latest \ --push .Dockerfile Details
Section titled “Dockerfile Details”The multi-stage build:
- Builder stage: Installs all deps, builds TypeScript
- Production stage: Copies only built files and production deps
Final image is ~150MB (Alpine + Node.js + production dependencies).
Health Check
Section titled “Health Check”The container includes a health check:
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1Kubernetes
Section titled “Kubernetes”Example deployment:
apiVersion: apps/v1kind: Deploymentmetadata: name: workflow-mcpspec: replicas: 1 selector: matchLabels: app: workflow-mcp template: metadata: labels: app: workflow-mcp spec: containers: - name: workflow-mcp image: blackmesa/workflow-mcp:latest ports: - containerPort: 3000 env: - name: MCP_WORKSPACE_DIR value: /data volumeMounts: - name: data mountPath: /data livenessProbe: httpGet: path: /health port: 3000 initialDelaySeconds: 5 periodSeconds: 30 volumes: - name: data persistentVolumeClaim: claimName: workflow-mcp-data