Files
diary-system/start.sh

26 lines
575 B
Bash
Raw Normal View History

#!/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/"