Production Deployment & Operations Guide
This guide covers production deployment, Docker containerization, Systemd service management, and Nginx reverse proxy configurations for glow-prow-ai-mcp.
1. System Requirements
- OS: Linux (Debian 12+ / Ubuntu 22.04 LTS+)
- Node.js: Node.js >= 20.0.0 LTS
- Database: MySQL >= 8.0 or MariaDB >= 10.6
- Cache: Redis >= 6.0
- Container: Docker >= 24.0 & Docker Compose >= 2.20
2. Docker Compose Deployment
version: '3.8'
services:
glow-prow-mcp:
build:
context: .
dockerfile: Dockerfile
container_name: glow-prow-ai-mcp
restart: always
read_only: true
user: "1000:1000"
ports:
- "127.0.0.1:3002:3002"
env_file:
- .env
tmpfs:
- /tmp:rw,noexec,nosuid
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:3002/health"]
interval: 30s
timeout: 5s
retries: 3
Run:
docker compose up -d
curl http://127.0.0.1:3002/health
3. Nginx Reverse Proxy for SSE Streaming
Streamable HTTP and SSE require disabling proxy buffering and timeouts:
server {
listen 443 ssl http2;
server_name mcp.glow-prow.top;
ssl_certificate /etc/letsencrypt/live/mcp.glow-prow.top/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mcp.glow-prow.top/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3002;
proxy_http_version 1.1;
# Disable buffering and cache for SSE
proxy_buffering off;
proxy_cache off;
chunked_transfer_encoding on;
proxy_set_header Connection '';
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /health {
proxy_pass http://127.0.0.1:3002/health;
access_log off;
}
}