Configuration Overview
Thecompose.prod.yaml configuration includes:
- Pre-built images - Uses published images from
ghcr.io/hitesh22rana/chronoverse - Resource limits - CPU and memory constraints for stability
- Horizontal scaling - Multiple replicas for worker services
- Nginx reverse proxy - Single entry point on port 80
- Production security - No exposed internal ports
- Optimized settings - Production-grade configurations
Resource Allocation
The production compose file defines three resource profiles:Database Services
- Limits: 1 CPU, 1 GB RAM
- Reservations: 0.5 CPU, 512 MB RAM
- Services: PostgreSQL, ClickHouse, Redis, Kafka
Application Services
- Limits: 0.25 CPU, 256 MB RAM
- Reservations: 0.1 CPU, 128 MB RAM
- Services: users-service, workflows-service, jobs-service, notifications-service, analytics-service, server
Worker Services
Low-Resource Workers (2 replicas each):- Limits: 0.5 CPU, 2 GB RAM
- Reservations: 0.25 CPU, 1 GB RAM
- Workers: scheduling-worker, workflow-worker, joblogs-processor, analytics-processor
- Limits: 2 CPU, 4 GB RAM
- Reservations: 1 CPU, 2 GB RAM
- Workers: execution-worker
Deploying to Production
Prepare the Server
Ensure your production server meets requirements:
- Docker Engine 20.10+
- Docker Compose V2
- 8+ CPU cores
- 16+ GB RAM
- 100+ GB disk space
Configure Environment
Edit
compose.prod.yaml and update:- Database passwords (PostgreSQL, ClickHouse)
- Meilisearch master key
- Server allowed origins
- Any other environment-specific settings
Access the Application
The application is now available on port 80:
- Web Interface: http://your-server-ip
- API: http://your-server-ip/api/
Configure DNS and TLS termination at your load balancer or reverse proxy.
Nginx Reverse Proxy
The production deployment includes an nginx reverse proxy that routes traffic:Routing Rules
/→ Dashboard (port 3000)/api/→ Server API (port 8080)/api/workflows/{id}/jobs/{id}/events→ Server-Sent Events (SSE) with special configuration
SSE Configuration
The nginx proxy includes optimized settings for Server-Sent Events:Scaling Workers
The production configuration scales workers for high availability:Current Scaling
- scheduling-worker: 2 replicas
- workflow-worker: 2 replicas
- execution-worker: 2 replicas
- joblogs-processor: 2 replicas
- analytics-processor: 2 replicas
Adjusting Replicas
To scale workers up or down, editcompose.prod.yaml:
Security Considerations
Change Default Credentials
Update these values incompose.prod.yaml:
Network Isolation
- All services run on isolated
chronoversenetwork - Only nginx is exposed (port 80)
- Internal services use mTLS
TLS Certificates
Theinit-certs service generates:
- Self-signed CA certificate
- Service certificates for mTLS
- Client certificates for database access
- ED25519 keypair for JWT authentication
For production, consider using proper CA-signed certificates or integrate with your certificate management system.
Docker Socket Access
Thedocker-proxy service provides controlled access to Docker socket:
- Read-only permissions for most operations
- Limited to specific API endpoints
- Used by execution-worker and workflow-worker
Monitoring Production
Service Health
Resource Usage
Logs
LGTM Observability
Access Grafana for detailed metrics and traces:Backup and Restore
Backing Up Data
Restoring Data
Updating Services
Troubleshooting Production
Service Won’t Start
High Resource Usage
Database Connection Issues
Worker Not Processing Jobs
High Availability
For production high availability:- Deploy across multiple hosts - Use Docker Swarm or Kubernetes
- External load balancer - Route traffic across multiple nginx instances
- Managed databases - Consider using managed PostgreSQL, Redis, and ClickHouse
- Persistent volumes - Use network storage or managed volume solutions
- Certificate management - Integrate with Vault or cert-manager
Next Steps
Configuration Reference
Complete environment variable reference
Monitoring Setup
Set up production monitoring
Backup Strategy
Implement backup and disaster recovery
Security Hardening
Production security best practices