Обновить run.sh

This commit is contained in:
2026-04-07 21:50:04 +03:00
parent d98a0eb7fc
commit fcdff4967b

22
run.sh
View File

@@ -1,19 +1,19 @@
#!/bin/bash #!/bin/bash
# Качаем новую версию # 1. Снимаем блокировку Git (на случай, если что-то изменилось локально)
git pull git reset --hard HEAD
git pull origin master
# Активируем виртуальное окружение (если есть) # 2. Убиваем старые процессы, чтобы освободить порты 8000 и 8501
source venv/bin/activate fuser -k 8000/tcp
fuser -k 8501/tcp
# Запускаем Бэкенд в фоне # 3. Запуск Бэкенда (указываем правильный файл main.py)
echo "Starting Backend..." echo "Starting Backend..."
python3 main.py > backend.log 2>&1 & nohup python3 main.py > backend.log 2>&1 &
# Запускаем Фронтенд в фоне # 4. Запуск Фронтенда
echo "Starting Frontend..." echo "Starting Frontend..."
streamlit run ui.py --server.port 8501 > frontend.log 2>&1 & nohup streamlit run ui.py --server.port 8501 > frontend.log 2>&1 &
echo "Services are running in background!" echo "Services started!"
echo "Backend: http://localhost:8000"
echo "Frontend: http://localhost:8501"