add docker

This commit is contained in:
2026-04-07 22:06:27 +03:00
parent 0eb46e4255
commit dc367e2327
10 changed files with 102 additions and 107 deletions

20
run.sh
View File

@@ -1,19 +1,9 @@
#!/bin/bash
# 1. Снимаем блокировку Git (на случай, если что-то изменилось локально)
git reset --hard HEAD
git pull origin master
set -euo pipefail
# 2. Убиваем старые процессы, чтобы освободить порты 8000 и 8501
fuser -k 8000/tcp
fuser -k 8501/tcp
echo "Starting services with Docker Compose..."
docker compose up --build -d
# 3. Запуск Бэкенда (указываем правильный файл main.py)
echo "Starting Backend..."
nohup python3 main.py > backend.log 2>&1 &
# 4. Запуск Фронтенда
echo "Starting Frontend..."
nohup streamlit run ui.py --server.port 8501 > frontend.log 2>&1 &
echo "Services started!"
echo "Backend: http://localhost:8000/health"
echo "Frontend: http://localhost:8501"