航海家计划后端API服务
- 框架: FastAPI
- 数据库: PostgreSQL
- 缓存: Redis
- 部署: Docker
- Python 3.8+
- PostgreSQL
- Redis
- 安装依赖
pip install -r requirements.txt- 配置环境变量
cp .env.example .env
# 编辑.env文件设置数据库和Redis连接信息- 数据库迁移
python db_migrate.py- 运行服务
python server.py服务将在 http://localhost:1912 启动
docker build -t tinder .
docker run -p 1912:1912 tinder├── modules/ # 功能模块(用户、索引等)
├── core/ # 核心功能(数据库迁移)
├── docs/ # 文档
├── server.py # 主应用入口
├── db_migrate.py # 数据库迁移管理
└── requirements.txt # 项目依赖
启动服务后访问 http://localhost:1912/docs 查看Swagger文档