docker-compose.prod.ymlā¢1.64 kB
version: '3.8'
services:
mcp-tailwind:
build:
context: .
dockerfile: Dockerfile.runtime
container_name: mcp-tailwind-server
env_file:
- .env
environment:
- NODE_ENV=production
- LOG_LEVEL=info
restart: unless-stopped
networks:
- mcp-network
volumes:
- ./logs:/app/logs
- ./data:/app/data
deploy:
resources:
limits:
memory: 512M
cpus: '1.0'
reservations:
memory: 256M
cpus: '0.5'
healthcheck:
test: ["CMD", "node", "-e", "console.log('Health check passed')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
security_opt:
- no-new-privileges:true
read_only: false
tmpfs:
- /tmp:noexec,nosuid,size=100m
# Optional: Add monitoring service
mcp-monitor:
image: prom/prometheus:latest
container_name: mcp-monitor
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
networks:
- mcp-network
depends_on:
- mcp-tailwind
profiles:
- monitoring
networks:
mcp-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
volumes:
prometheus_data:
driver: local