This commit is contained in:
2026-04-07 21:54:04 +03:00

21
run.sh
View File

@@ -1,16 +1,19 @@
#!/bin/bash #!/bin/bash
# Активируем виртуальное окружение (если есть) # 1. Снимаем блокировку Git (на случай, если что-то изменилось локально)
source venv/bin/activate git reset --hard HEAD
git pull origin master
# Запускаем Бэкенд в фоне # 2. Убиваем старые процессы, чтобы освободить порты 8000 и 8501
fuser -k 8000/tcp
fuser -k 8501/tcp
# 3. Запуск Бэкенда (указываем правильный файл main.py)
echo "Starting Backend..." echo "Starting Backend..."
python3 app.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"