Files
diary-system/deploy_update.sh
maoshen a7893cbad5 feat: 创建初始任务数据
添加 6 个示例任务展示功能:
- 4 个已完成任务(日记系统、城市手册、OpenClaw、Git 仓库)
- 1 个进行中任务(日记系统功能完善)
- 1 个待开始任务(等待新任务)
2026-04-14 10:18:46 +00:00

31 lines
719 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 日记系统 - 更新部署脚本(云服务器)
# 用于更新已有部署
set -e
echo "======================================"
echo "⚡ 日记系统 - 更新部署"
echo "======================================"
# SSH 到云服务器执行更新
ssh ubuntu@cssc.datalibstar.com << 'EOF'
cd /home/ubuntu/diary-system
echo "📥 拉取最新代码..."
git pull origin main
echo "🗄️ 数据库迁移..."
cd backend
python3 manage.py migrate --noinput
echo "🔄 重启服务..."
sudo systemctl restart diary-system
echo "✅ 更新完成!"
EOF
echo ""
echo "🎉 部署完成!"
echo "访问地址http://cssc.datalibstar.com:8001/"