feat: add backend CI/CD deployment

This commit is contained in:
hailt 2026-11-12 21:32:31 +07:00
parent 8d40cff227
commit 7c2e6ed571
21 changed files with 269 additions and 41 deletions

View file

@ -1,9 +1,9 @@
#!/bin/bash
# Restart danable API safely: pattern lives in this file, never in the caller cmdline.
# Restart danagble API safely: pattern lives in this file, never in the caller cmdline.
pkill -f 'uvicorn src\.main:app' 2>/dev/null
sleep 2
cd /home/hailt/danagble/backend
setsid -f .venv/bin/python -m uvicorn src.main:app --host 0.0.0.0 --port 8000 </dev/null >>/tmp/danable-api.log 2>&1
setsid -f .venv/bin/python -m uvicorn src.main:app --host 0.0.0.0 --port 8000 </dev/null >>/tmp/danagble-api.log 2>&1
sleep 4
curl -s -m 5 localhost:8000/api/v1/health
echo