Initial commit: 日记系统

完整的日记记录系统
- Django 后端 (diary app)
- 前端页面
- 部署脚本 (本地 + 云端)
- Nginx 配置
- 数据迁移和同步工具
This commit is contained in:
maoshen
2026-04-14 10:07:27 +00:00
commit b273789ae8
31 changed files with 1457 additions and 0 deletions

25
start.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# 日记系统启动脚本
cd /root/.openclaw/workspace/diary-system/backend
# 安装依赖
pip3 install -r requirements.txt -q
# 数据库迁移
python3 manage.py makemigrations diary
python3 manage.py migrate
# 收集静态文件
python3 manage.py collectstatic --noinput
# 启动 Gunicorn
echo "🚀 启动日记系统..."
gunicorn diary_system.wsgi:application \
--bind 127.0.0.1:8002 \
--workers 3 \
--daemon
echo "✅ 日记系统已启动"
echo "📝 访问地址http://127.0.0.1:8001/"
echo "🔧 Admin: http://127.0.0.1:8001/admin/"