feat: 更新后端配置、Docker部署、API模块及多项文档
- 更新后端 main.py、config.py 核心配置 - 更新 compute API 模块 - 更新 Docker 部署配置(app/compute docker-compose、nginx、环境变量) - 更新前端 API 模块(dataset、model、request)及 vite 配置 - 更新多项项目文档(架构、部署、开发计划、日志等) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
backend/
|
||||
app/
|
||||
main.py # FastAPI 应用入口
|
||||
api/v1/ # 对前端暴露的 API 路由
|
||||
api/v1/ # 对前端暴露的 接口路由
|
||||
core/ # 配置、日志、中间件、权限等基础能力
|
||||
db/ # 数据库连接、迁移集成、事务工具
|
||||
modules/ # 业务模块
|
||||
@@ -48,7 +48,7 @@ uvicorn app.main:app --reload
|
||||
健康检查:
|
||||
|
||||
```text
|
||||
GET /api/v1/health
|
||||
GET /modelTF/health
|
||||
```
|
||||
|
||||
## 日志
|
||||
|
||||
@@ -14,7 +14,7 @@ def _int_env(name: str, default: int) -> int:
|
||||
class Settings:
|
||||
app_name: str = os.getenv("APP_NAME", "YG Fine-Tune Platform API")
|
||||
app_env: str = os.getenv("APP_ENV", "local")
|
||||
api_prefix: str = os.getenv("API_PREFIX", "/api")
|
||||
route_prefix: str = os.getenv("MODELTF_ROUTE_PREFIX", "/modelTF")
|
||||
app_mode: str = os.getenv("APP_MODE", "local")
|
||||
local_db_path: str = os.getenv("LOCAL_DB_PATH", "./runtime/platform.db")
|
||||
compute_mode: str = os.getenv("COMPUTE_MODE", "simulator")
|
||||
|
||||
@@ -11,7 +11,7 @@ def create_app() -> FastAPI:
|
||||
|
||||
app = FastAPI(title=settings.app_name)
|
||||
setup_request_logging(app)
|
||||
app.include_router(api_router, prefix=settings.api_prefix)
|
||||
app.include_router(api_router, prefix=settings.route_prefix)
|
||||
return app
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user