Deployment Options
Kortix supports multiple production deployment strategies:Docker Compose
Simple deployment for single-server setups
AWS ECS
Managed container orchestration with auto-scaling
AWS EKS
Kubernetes-based deployment for enterprise scale
AWS Lightsail
Cost-effective cloud hosting for small workloads
Docker Compose Deployment
Best for single-server deployments or small teams.Server Setup
1
Provision Server
Set up a Linux server (Ubuntu 22.04 LTS recommended) with:
- 4+ CPU cores
- 8GB+ RAM
- 50GB+ disk space
- Public IP address
2
Install Dependencies
3
Clone Repository
4
Configure Environment
5
Start Services
SSL/HTTPS Setup
Use Nginx or Caddy as a reverse proxy with automatic HTTPS:AWS ECS Deployment
Managed container orchestration with auto-scaling and high availability.Architecture
Prerequisites
- AWS account with appropriate permissions
- AWS CLI configured
- Domain name configured in Route53 or Cloudflare
- Container image pushed to ECR or GHCR
Infrastructure Setup
Kortix includes Pulumi infrastructure-as-code for ECS:1
Install Pulumi
2
Configure Secrets
Create AWS Secrets Manager secret with environment variables:
3
Configure Pulumi
Copy example configuration:Update required values:
4
Deploy Infrastructure
ECS Configuration
Key ECS settings from the infrastructure:Auto-Scaling
ECS auto-scaling configuration:- Peak hours (Mon-Fri 6AM-6PM PT): 3-10 tasks
- Off-peak: 2-6 tasks
AWS EKS Deployment
Kubernetes-based deployment for enterprise scale with advanced features.Architecture
Prerequisites
- AWS account with EKS permissions
kubectlinstalled- Pulumi installed
- Container image in ECR/GHCR
Infrastructure Deployment
1
Navigate to EKS Config
2
Configure EKS Settings
The infrastructure creates:
- EKS cluster (v1.31)
- Node group with c7i.2xlarge instances (8 vCPU, 16 GB RAM)
- Application Load Balancer
- Auto-scaling policies
- CloudWatch monitoring
3
Deploy Infrastructure
- EKS cluster:
suna-eks - Namespace:
suna - Deployment:
suna-api - Service:
suna-api(ClusterIP) - Ingress:
suna-api(ALB) - HPA:
suna-api(4-15 pods)
4
Configure kubectl
Kubernetes Configuration
Pod resources:- Startup: 10s initial delay, 12 attempts × 10s = 130s max startup time
- Readiness: Every 10s, removes from load balancer after 3 failures
- Liveness: Every 30s, restarts pod after 3 failures
EKS Operations
Deploy new version:AWS Lightsail Deployment
Cost-effective deployment for small workloads.1
Create Lightsail Instance
- Go to AWS Lightsail console
- Create instance with Ubuntu 22.04 LTS
- Choose plan: 2GB RAM minimum, 4GB recommended
- Enable static IP
2
Configure Instance
SSH into instance and follow Docker Compose deployment steps above.
3
Setup Cloudflare Tunnel
CI/CD Pipeline
Kortix includes GitHub Actions workflows for automated deployments.Docker Build & Deploy
Workflow:.github/workflows/docker-build.yml
Triggers on push to PRODUCTION branch:
1
Build Image
Builds Docker image for backend and frontend
2
Push to Registry
Pushes to GitHub Container Registry with tags:
:prod(latest production):<commit-sha>(specific version)
3
Deploy to Targets
Deploys in parallel to:
- Lightsail (SSH + docker compose)
- ECS (update service)
- EKS (kubectl set image)
Secrets Configuration
Configure GitHub repository secrets:Monitoring & Alerting
CloudWatch
AWS deployments include CloudWatch dashboards and alarms: Alarms:- CPU > 70% (warning) or > 85% (critical)
- Memory > 75% (warning) or > 90% (critical)
- Pod/Task count < 1 (critical)
- High latency (P99 > 2000ms)
- High error rate (> 5%)
suna-api-prod
Better Stack
For EKS deployments, Better Stack provides:- Real-time log aggregation
- Performance metrics
- Uptime monitoring
- Custom dashboards
Backup & Disaster Recovery
Database Backups
Supabase provides automatic backups:- Point-in-time recovery
- Daily snapshots
- Configurable retention
Application Backups
For self-managed deployments:Disaster Recovery Plan
1
Identify Failure
Monitor CloudWatch alarms or Better Stack alerts
2
Assess Impact
Check service health, pod/task status, logs
3
Execute Recovery
- For pod crashes: Auto-restart (automatic)
- For bad deployment: Rollback with
kubectl rollout undo - For node failure: Auto-scaling adds replacement
- For complete failure: Redeploy from infrastructure code
4
Verify Recovery
Test endpoints, check logs, validate data integrity
Performance Optimization
Scaling Recommendations
Development/Testing:- 1-2 pods/tasks
- t3.medium or t4g.medium instances
- Single node
- 2-4 pods/tasks
- c7i.large or c6i.large instances
- 2 nodes (HA)
- 4-15 pods (auto-scaled)
- c7i.2xlarge instances
- 2-8 nodes (auto-scaled)
Cost Optimization
- Use Graviton (ARM) instances: 20% cheaper than x86
- Use Spot instances for non-critical workloads: 70% cheaper
- Enable auto-scaling: Scale down during off-peak hours
- Use CloudFront CDN for static assets
- Optimize LLM provider costs with model selection
Next Steps
Monitoring
Set up monitoring dashboards and alerts
Troubleshooting
Common deployment issues and solutions