Skip to content

Commit 51fd634

Browse files
committed
add scrpit to rin backend and frontend
1 parent 61f5471 commit 51fd634

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

scripts/deploy.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ VENV_PATH="/home/ny/projects/venv"
66

77
echo "=== Deploying frontend ==="
88
cd $DEPLOY_PATH/frontend
9-
npm install
10-
pm2 start npm --name frontend -- run start || pm2 restart frontend
9+
npm install --legacy-peer-deps
10+
# Restart frontend service
11+
sudo systemctl restart frontend.service
1112

1213
echo "=== Deploying backend ==="
13-
cd $DEPLOY_PATH/backend
14-
source $VENV_PATH/bin/activate
15-
# Restart backend using PM2 and uvicorn
16-
pm2 start uvicorn --name backend -- \
17-
app.main:app --host 0.0.0.0 --port 8000 || pm2 restart backend
14+
# Restart backend service
15+
sudo systemctl restart backend.service
1816

1917
echo "Deployment complete 🚀"

0 commit comments

Comments
 (0)