Overview
Orphelix can be deployed in multiple ways depending on your infrastructure and requirements. This guide covers all deployment methods from simple standalone setups to enterprise Kubernetes deployments.Standalone
Single-server deployment with PM2
Docker
Containerized deployment with Docker Compose
Kubernetes
Native Kubernetes deployment with Helm
Cloud Platforms
AWS, GCP, Azure managed services
Prerequisites
General Requirements
Node.js 20+
Node.js 20+
Required for all deployment methods
Kubernetes Access
Kubernetes Access
Required for real cluster mode
- Valid kubeconfig file
- Appropriate RBAC permissions
- Network access to Kubernetes API
get,list,watchon: pods, deployments, services, nodes, events, configmaps, secretspatchon deployments (for restart)
GitHub Integration (Optional)
GitHub Integration (Optional)
Required for GitOps features
- GitHub OAuth App credentials
- GitHub App credentials (for repository access)
OpenAI API Key (Optional)
OpenAI API Key (Optional)
Required for AI features
Deployment Methods
Method 1: Standalone (PM2)
Best for: Small teams, single server, quick setup1
Clone repository
2
Install dependencies
3
Configure environment
.env.local:4
Build application
.next/standalone/5
Start with CLI
6
Access application
- Use reverse proxy (nginx, Caddy)
- Enable HTTPS with Let’s Encrypt
- Configure firewall rules
- Set up log rotation
- Enable automatic restart on crash
Method 2: Docker
Best for: Containerized environments, isolated deployments- Docker Compose (Recommended)
- Docker CLI
Create docker-compose.yml:Create Dockerfile:Deploy:
- Mount kubeconfig as read-only volume
- Persist database with volume
- Use secrets management for sensitive data
- Configure health checks
- Set resource limits (CPU, memory)
Method 3: Kubernetes (Helm)
Best for: Enterprise deployments, high availability, scalability1
Install Helm
2
Add Orphelix Helm repository
Helm chart coming soon! For now, use manual deployment below.
3
Create namespace
4
Create secrets
5
Create deployment manifest
Create orphelix-deployment.yaml:
6
Create RBAC for cluster access
Create orphelix-rbac.yaml:
7
Deploy
8
Access application
- Set
replicas: 3or more - Use anti-affinity rules
- Configure HPA for auto-scaling
- Use external database (PostgreSQL)
- Implement distributed sessions
Method 4: Cloud Platforms
- AWS
- GCP
- Azure
AWS Elastic Kubernetes Service (EKS)AWS-specific features:
1
Create EKS cluster
2
Install AWS Load Balancer Controller
3
Deploy Orphelix
Use Kubernetes deployment method aboveUpdate Ingress:
- Use EKS IRSA for kubeconfig auth
- Store secrets in AWS Secrets Manager
- Use RDS for database
- CloudWatch for logs and metrics
Configuration
Environment Variables
Required
Required
GitHub Integration
GitHub Integration
AI Features
AI Features
Optional
Optional
Reverse Proxy (nginx)
nginx configuration:Monitoring
Health Checks
Endpoint:/api/health
Logs
- PM2
- Docker
- Kubernetes
Metrics
Prometheus metrics: (Coming soon)Backup and Recovery
Database Backup
SQLite database:Kubernetes Backup
Using Velero:Security Hardening
Best Practices
HTTPS Only
HTTPS Only
- Force HTTPS redirect
- Use valid SSL certificates
- Enable HSTS headers
- Configure secure cookies
Secrets Management
Secrets Management
- Never commit secrets to Git
- Use environment variables
- Use secret managers (AWS Secrets Manager, Azure Key Vault, etc.)
- Rotate secrets regularly
Network Security
Network Security
- Configure firewall rules
- Use private networks
- Implement rate limiting
- Enable DDoS protection
Authentication
Authentication
- Enforce strong passwords
- Enable 2FA for GitHub
- Use short-lived tokens
- Implement session timeout
Monitoring
Monitoring
- Enable audit logging
- Monitor failed login attempts
- Set up alerts for anomalies
- Regular security reviews
Security Headers
Add to nginx config:Troubleshooting
Application won't start
Application won't start
Check:
- Node version:
node --version(must be 20+) - Port availability:
lsof -i :3000 - Environment variables: Check .env.local
- Database: Verify orphelix.db exists and is writable
Can't connect to cluster
Can't connect to cluster
Check:
- Kubeconfig:
kubectl config view - Current context:
kubectl config current-context - Cluster access:
kubectl get nodes - RBAC permissions:
kubectl auth can-i get pods
- AWS: Token may be expired, run
aws eks update-kubeconfig - GCP: Run
gcloud container clusters get-credentials - Azure: Run
az aks get-credentials
GitHub integration not working
GitHub integration not working
Check:
- OAuth App credentials in .env.local
- GitHub App credentials
- Callback URL matches:
https://your-domain.com/api/auth/callback/github - Organization access granted
High memory usage
High memory usage
Solutions:
- Increase memory limit in PM2/Docker/K8s
- Reduce concurrent requests
- Enable aggressive garbage collection:
- Check for memory leaks in logs
Upgrading
Standalone
Docker
Kubernetes
Performance Tuning
Node.js Optimization
Next.js Optimization
Database Optimization
Next Steps
Getting Started
Development environment setup
Architecture
System design and patterns
Configuration
Cluster and application config
Contributing
Contribute to Orphelix
Support
Need help? Create an issue or ask in Discussions.