feat():learning后台管理项目初始化

This commit is contained in:
yuj
2025-12-04 16:23:46 +08:00
parent 39886d50d2
commit 88e048f4d1
154 changed files with 28966 additions and 6 deletions

28
scripts/run_invite_api.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# 邀请码申请 API 启动脚本
set -e
cd "$(dirname "$0")/.."
echo "=== 邀请码申请 API 启动 ==="
# 加载环境变量(如果存在 .env 文件)
if [ -f scripts/.env ]; then
echo "✓ 加载自定义配置: scripts/.env"
export $(grep -v '^#' scripts/.env | xargs)
else
echo "✓ 使用默认配置: AWS RDS (goalfyagent-aurora-mysql-staging)"
echo " 提示: 如需使用本地数据库,请创建 scripts/.env 文件"
fi
# 检查依赖
echo "检查 Python 依赖..."
uv pip install -q fastapi uvicorn sqlalchemy pymysql pydantic[email]
# 启动服务
echo "启动服务..."
echo "访问地址: http://localhost:8000"
echo "API 文档: http://localhost:8000/docs"
echo ""
uv run scripts/invite_code_api.py