Files
2026-07-05 17:40:52 +00:00

17 lines
690 B
Bash
Executable File

#!/bin/bash
# Deploy to remote server, excluding DB and other local-only files
rsync -av \
--exclude '.git' \
--exclude '__pycache__' \
--exclude '*.pyc' \
--exclude '.gitignore' \
--exclude 'cs2_simulator.db' \
--exclude '*.log' \
--exclude 'remote-deploy.sh' \
--delete \
/root/dodep-simulator/ \
root@zernmc.ru:/root/dodep/
ssh root@zernmc.ru "cd /root/dodep && pip install --break-system-packages -r requirements.txt 2>&1 | tail -5 && pkill -f 'uvicorn' 2>/dev/null; pkill -f 'python3.*backend' 2>/dev/null; sleep 2; rm -rf __pycache__ && setsid python3 -m uvicorn frontend:app --host 0.0.0.0 --port 13669 > /tmp/frontend.log 2>&1 &"
echo "Deployed and restarted."