Files
aitsc/scripts/quick_deploy_history.sh
renjianbo 3b806e2bde refactor: project restructuring - migrate to modular directory layout
- Move root-level docs into docs/ directory
- Move config files into config/ directory
- Move docker files into docker/ directory
- Move test scripts into tests/ directory
- Remove .env from tracking (use .env.example as template)
- Remove .venv/ from tracking (use requirements.txt)
- Add Vue3 frontend app (vue-app/)
- Add new routes: upload, user_templates, meeting_minutes, etc.
- Add database migrations for prompt_template additions
- Fix load_dotenv() to use absolute path for Flask reloader compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-13 22:34:53 +08:00

56 lines
1.5 KiB
Bash

#!/bin/bash
# 优化历史功能一键部署脚本
# 用于腾讯云数据库快速部署
echo "🚀 开始部署优化历史功能到腾讯云数据库"
echo "================================================"
# 检查Python环境
echo "1. 检查Python环境..."
if ! command -v python3 &> /dev/null; then
echo "❌ Python3 未安装"
exit 1
fi
echo "✅ Python3 环境正常"
# 检查pymysql模块
echo "2. 检查依赖模块..."
python3 -c "import pymysql" 2>/dev/null
if [ $? -ne 0 ]; then
echo "⚠️ pymysql 模块未安装,正在安装..."
pip install pymysql
if [ $? -ne 0 ]; then
echo "❌ pymysql 安装失败"
exit 1
fi
fi
echo "✅ 依赖模块检查完成"
# 执行部署脚本
echo "3. 执行数据库部署..."
python3 deploy_tencent_simple.py
if [ $? -eq 0 ]; then
echo ""
echo "🎉 数据库部署成功!"
echo "================================================"
echo "📋 下一步操作:"
echo " 1. 重启应用服务"
echo " 2. 测试功能"
echo " 3. 访问历史页面"
echo ""
echo "🔧 重启应用命令:"
echo " pkill -f gunicorn"
echo " gunicorn -c gunicorn.conf.py src.flask_prompt_master:app"
echo ""
echo "🧪 测试功能命令:"
echo " python3 test_history_feature.py"
echo ""
echo "🌐 访问地址:"
echo " 历史页面: http://localhost:5002/history"
echo " API接口: http://localhost:5002/api/history"
else
echo "❌ 数据库部署失败"
exit 1
fi