Skip to content

Commit 4268879

Browse files
committed
update some config
1 parent 193404f commit 4268879

4 files changed

Lines changed: 22 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
# Fix permissions
5656
ssh -i ~/.ssh/id_rsa_team -o StrictHostKeyChecking=no -p $SSH_HOST_PORT $SSH_USER@$SSH_HOST "chmod 755 -R $DEPLOYMENT_DIRECTORY"
5757
58-
# # Run deployment script on server
59-
# ssh -i ~/.ssh/id_rsa_team -p $SSH_HOST_PORT -o StrictHostKeyChecking=no $SSH_USER@$SSH_HOST "bash $DEPLOYMENT_DIRECTORY/scripts/deploy.sh"
58+
# Run deployment script on server
59+
ssh -i ~/.ssh/id_rsa_team -p $SSH_HOST_PORT -o StrictHostKeyChecking=no $SSH_USER@$SSH_HOST "bash $DEPLOYMENT_DIRECTORY/scripts/start.sh"
6060
6161
6262

backend/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ EXPOSE 8000
1515

1616
# Run FastAPI with uvicorn
1717
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
18+
# uvicorn app:app --host 0.0.0.0 --port 8000

script/start.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -e
3+
4+
DEPLOY_PATH="/home/ny/project/final"
5+
VENV_PATH="/home/ny/project/venv"
6+
7+
echo "=== Deploying frontend ==="
8+
cd $DEPLOY_PATH/frontend
9+
npm run build
10+
11+
12+
# 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
18+
19+
# echo "Deployment complete 🚀"

scripts/deploy.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)