Initial commit

This commit is contained in:
2026-07-18 12:00:33 +05:30
commit caac8413e9
83 changed files with 10262 additions and 0 deletions

54
docs/DEPLOY.md Normal file
View File

@@ -0,0 +1,54 @@
# Simple Deployment Guide
## 🚀 One-Command Deploy
Just run this from the `kubernetes` folder:
```bash
./build-and-deploy.sh
```
This will:
1. ✅ Build both Docker images (FastAPI + Worker)
2. ✅ Deploy everything to Kubernetes
3. ✅ Set up auto-scaling
## 📋 What Gets Deployed
- **FastAPI:** 4 pods initially (scales 4-20 based on load)
- **Workers:** 2 pods initially (scales 2-10 based on load)
- **Auto-scaling:** Enabled for both
- **Pod Distribution:** Spreads across nodes automatically
## ✅ After Deployment
Check status:
```bash
kubectl get pods -n nats-backend
kubectl get services -n nats-backend
kubectl get hpa -n nats-backend
```
View logs:
```bash
kubectl logs -f deployment/fastapi-backend -n nats-backend
kubectl logs -f deployment/nats-worker -n nats-backend
```
Test FastAPI:
```bash
kubectl port-forward -n nats-backend service/fastapi-backend 8000:80
curl http://localhost:8000/health
```
## 🔧 Configuration
All settings are in `manifests/`:
- `secrets.yaml` - NATS credentials and external API
- `fastapi-deployment.yaml` - FastAPI config
- `worker-deployment.yaml` - Worker config
---
**That's it!** Everything is ready to deploy! 🎉