-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
66 lines (57 loc) · 1.65 KB
/
deploy.sh
File metadata and controls
66 lines (57 loc) · 1.65 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# ============================================
# Ultimate AI Agent - Deployment Script
# Supports: Railway, Render, Fly.io, or any Docker host
# ============================================
set -e
APP_NAME="ultimate-ai-agent"
SERVICE_NAME="agentic-api"
echo "🚀 Deploying $APP_NAME to Production..."
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "Error: Docker is not running."
exit 1
fi
# Build image
echo "📦 Building Docker image..."
docker build -t "$APP_NAME:latest" .
# Tag for registry (adjust for your cloud provider)
# e.g., for AWS ECR: docker tag $APP_NAME:latest account-id.dkr.ecr.region.amazonaws.com/$APP_NAME:latest
# e.g., for Railway: railway up
# e.g., for Render: auto-deployed from git
echo "✅ Image built successfully."
# Run locally or push
read -p "Push to cloud? [y/N] " confirm
if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]]; then
echo "Please select provider:"
echo "1) Railway"
echo "2) Render (via git push)"
echo "3) AWS ECR"
read -p "Choice: " provider
case $provider in
1)
if command -v railway &> /dev/null; then
echo "🚄 Deploying to Railway..."
railway up
else
echo "Please install Railway CLI first."
fi
;;
2)
echo "🌐 Pushing to Git for Render auto-deploy..."
git add .
git commit -m "Deploy: Update agent code"
git push origin main
;;
3)
echo "☁️ Pushing to AWS ECR..."
# Add AWS CLI commands here
echo "Requires AWS setup."
;;
*)
echo "Invalid choice."
;;
esac
else
echo "ℹ️ Run locally with: docker-compose up --build"
fi