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
Docker
Kubernetes
Cloud Platforms
Prerequisites
General Requirements
Node.js 20+
Node.js 20+
Kubernetes Access
Kubernetes Access
- 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)
- GitHub OAuth App credentials
- GitHub App credentials (for repository access)
OpenAI API Key (Optional)
OpenAI API Key (Optional)
Deployment Methods
Method 1: Standalone (PM2)
Best for: Small teams, single server, quick setupClone repository
Install dependencies
Configure environment
.env.local:Build application
.next/standalone/Start with CLI
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
- 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, scalabilityInstall Helm
Add Orphelix Helm repository
Create namespace
Create secrets
Create deployment manifest
Create RBAC for cluster access
Deploy
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
Create EKS cluster
Install AWS Load Balancer Controller
Deploy Orphelix
- 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
- 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
- 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
- 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
- Increase memory limit in PM2/Docker/K8s
- Reduce concurrent requests
- Enable aggressive garbage collection:
- Check for memory leaks in logs