From fcdff4967b01dd419a28355bc861a79d7a74e376 Mon Sep 17 00:00:00 2001 From: pirantelx Date: Tue, 7 Apr 2026 21:50:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20run.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/run.sh b/run.sh index 43d594d..116a437 100644 --- a/run.sh +++ b/run.sh @@ -1,19 +1,19 @@ #!/bin/bash -# Качаем новую версию -git pull +# 1. Снимаем блокировку Git (на случай, если что-то изменилось локально) +git reset --hard HEAD +git pull origin master -# Активируем виртуальное окружение (если есть) -source venv/bin/activate +# 2. Убиваем старые процессы, чтобы освободить порты 8000 и 8501 +fuser -k 8000/tcp +fuser -k 8501/tcp -# Запускаем Бэкенд в фоне +# 3. Запуск Бэкенда (указываем правильный файл main.py) echo "Starting Backend..." -python3 main.py > backend.log 2>&1 & +nohup python3 main.py > backend.log 2>&1 & -# Запускаем Фронтенд в фоне +# 4. Запуск Фронтенда 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 "Backend: http://localhost:8000" -echo "Frontend: http://localhost:8501" \ No newline at end of file +echo "Services started!" \ No newline at end of file