-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver-deploy.sh
More file actions
37 lines (29 loc) Β· 855 Bytes
/
server-deploy.sh
File metadata and controls
37 lines (29 loc) Β· 855 Bytes
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
#!/bin/bash
# Deploy SingFLEX from GitHub to server
echo "π Deploying SingFLEX from GitHub..."
cd /var/app/sf3
# Clone or pull latest code
if [ -d ".git" ]; then
echo "π₯ Pulling latest changes..."
git pull origin main
else
echo "π₯ Cloning repository..."
git clone https://github.com/OneTV-ng/SF3.git .
fi
# Setup environment files
echo "π Setting up environment files..."
bash server-setup.sh
echo "π¦ Installing dependencies..."
cd hub && npm install
cd ../hubx && npm install
echo "π¨ Building projects..."
cd ../hub && npm run build
cd ../hubx && npm run build
echo "ποΈ Running database migrations..."
cd ../hubx && npx sequelize-cli db:migrate
echo "β
Deployment complete!"
echo ""
echo "To start services:"
echo " pm2 start /var/app/sf3/hub/ecosystem.config.js"
echo " pm2 save"
echo " pm2 startup"