-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
45 lines (35 loc) · 1.24 KB
/
Copy pathdeploy.sh
File metadata and controls
45 lines (35 loc) · 1.24 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
#!/bin/bash
set -e
echo "🚀 Starting Githubify deployment on Amazon Linux..."
# 1️⃣ Update system
sudo yum update -y
# 2️⃣ Install base dependencies
sudo yum install -y git python3 python3-pip curl
# 3️⃣ Install UV package manager
echo "📦 Installing UV..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# Make sure uv is available in PATH
export PATH="$HOME/.local/bin:$PATH"
# 4️⃣ Clone or update repository
if [ ! -d "githubify-ethereum-bots-futurestack-hack" ]; then
echo "📁 Cloning repository..."
git clone https://github.com/Prayag2003/githubify-ethereum-bots-futurestack-hack
else
echo "📥 Updating repository..."
cd githubify-ethereum-bots-futurestack-hack
git pull
cd ..
fi
# 5️⃣ Navigate to server directory
cd githubify-ethereum-bots-futurestack-hack/server
# 6️⃣ Create and activate virtual environment
echo "🧱 Setting up virtual environment..."
uv venv
source .venv/bin/activate
# 7️⃣ Install Python dependencies (from requirements + uvicorn)
echo "📚 Installing dependencies..."
uv pip install -r requirements.txt
uv pip install uvicorn --upgrade
# 8️⃣ Launch FastAPI app
echo "🚀 Launching FastAPI server..."
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload