-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-production.sh
More file actions
executable file
Β·46 lines (38 loc) Β· 1.45 KB
/
deploy-production.sh
File metadata and controls
executable file
Β·46 lines (38 loc) Β· 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
echo "π Deploying Observer AI Production Infrastructure"
echo "=================================================="
# Set environment variables
export MONGO_PASSWORD="secure_mongo_password_123"
export JWT_SECRET="production_jwt_secret_key_456"
export GRAFANA_PASSWORD="admin_grafana_pass_789"
export BACKEND_URL="https://your-domain.com"
echo "π¦ Starting production deployment with Docker Compose..."
# Create .env file for production
cat > .env.production << EOF
MONGO_PASSWORD=${MONGO_PASSWORD}
JWT_SECRET=${JWT_SECRET}
GRAFANA_PASSWORD=${GRAFANA_PASSWORD}
BACKEND_URL=${BACKEND_URL}
EOF
# Deploy with production configuration
docker-compose -f docker-compose.production.yml --env-file .env.production up -d
echo "β
Production deployment started!"
echo ""
echo "π Services Status:"
docker-compose -f docker-compose.production.yml ps
echo ""
echo "π This deployment provides:"
echo " β’ 3 Backend instances with 4 workers each (12 total workers)"
echo " β’ Load-balanced Nginx frontend"
echo " β’ Redis caching"
echo " β’ Optimized MongoDB"
echo " β’ Prometheus monitoring"
echo " β’ Grafana dashboards"
echo ""
echo "π― Estimated capacity: ~1,200 concurrent users"
echo "π° Cost: Much lower than cloud Kubernetes"
echo ""
echo "π Access your services:"
echo " β’ Application: http://localhost"
echo " β’ Monitoring: http://localhost:3001 (admin/admin_grafana_pass_789)"
echo " β’ Metrics: http://localhost:9090"