chore: закоммичены все рабочие файлы smeta-web
Предотвращение потери данных при деплое: batch_v3, search_engine, xlsx_utils, тесты, скрипты деплоя, архитектура, security page, admin page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# Auto-deploy script for smeta-web
|
||||
# Called by Gitea webhook or manually: bash scripts/deploy.sh
|
||||
|
||||
set -e
|
||||
cd /home/mcp-user/smeta-web
|
||||
|
||||
echo "[$(date)] Deploy started"
|
||||
|
||||
# Pull latest
|
||||
git pull origin main 2>&1 || true
|
||||
|
||||
# Install deps if changed
|
||||
pip3 install -q -r requirements.txt 2>&1 || true
|
||||
|
||||
# Restart service
|
||||
sudo systemctl restart smeta-web
|
||||
sleep 3
|
||||
|
||||
# Verify service is running
|
||||
if systemctl is-active --quiet smeta-web; then
|
||||
echo "[$(date)] Service active"
|
||||
else
|
||||
echo "[$(date)] ERROR: Service not active!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Quick smoke test (5 questions)
|
||||
export $(grep SESSION_SECRET .env)
|
||||
RESULT=$(python3 tests/test_chat_quality.py --quick 2>&1 | grep "Passed:")
|
||||
echo "[$(date)] Test: $RESULT"
|
||||
|
||||
echo "[$(date)] Deploy complete"
|
||||
Reference in New Issue
Block a user