feat: 添加平台管理、计算模块适配器及前端页面更新

- 新增 platform API 端点和存储
- 新增 llama_factory 适配器
- 新增前端 compute、guide、system 等视图页面
- 新增 echarts 插件和 mock 数据
- 更新 Docker 配置、后端配置及文档
- 更新前端路由、API、侧边栏等组件

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
wuyongtao
2026-07-21 09:23:43 +08:00
parent 2c1e08a271
commit a67ca2c19c
43 changed files with 3632 additions and 814 deletions

View File

@@ -2,6 +2,15 @@ APP_ENV=prod
APP_NAME=YG Fine-Tune Platform API
API_PREFIX=/api
FRONTEND_IMAGE=yg-ft-frontend-runtime:latest
BACKEND_API_IMAGE=yg-ft-backend-api:latest
# Five-digit host ports exposed outside the application server.
FRONTEND_PORT=16801
BACKEND_API_PORT=17861
POSTGRES_PORT=15432
REDIS_PORT=16379
POSTGRES_DB=yg_ft
POSTGRES_USER=yg_ft
POSTGRES_PASSWORD=change_me
@@ -23,7 +32,7 @@ LOG_RETENTION_DAYS=10
API_PROXY_PASS=http://backend-api:8000
# Split deployment: set these to the compute server address, for example http://10.10.20.31:9100.
# Split deployment: set these to the compute server address, for example http://10.10.20.31:19100.
COMPUTE_API_BASE_URL=http://compute-api:9100
COMPUTE_SERVICE_TOKEN=change_me
FILE_GATEWAY_BASE_URL=http://compute-api:9101

View File

@@ -1,6 +1,4 @@
# syntax=docker/dockerfile:1
FROM python:3.11-slim
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \

View File

@@ -1,4 +1,3 @@
# syntax=docker/dockerfile:1
FROM nginx:1.27-alpine

View File

@@ -1,25 +1,12 @@
services:
frontend-builder:
image: node:20-alpine
profiles:
- build
working_dir: /workspace
volumes:
- ../../frontend:/workspace
- frontend_node_modules:/workspace/node_modules
command: sh -c "npm ci && npm run build"
frontend:
build:
context: ../..
dockerfile: docker/app/Dockerfile.frontend
image: yg-ft-frontend-runtime:latest
image: ${FRONTEND_IMAGE:-yg-ft-frontend-runtime:latest}
container_name: yg-ft-frontend
depends_on:
backend-api:
condition: service_started
ports:
- "6801:80"
- "${FRONTEND_PORT:-16801}:80"
environment:
API_PROXY_PASS: ${API_PROXY_PASS:-http://backend-api:8000}
volumes:
@@ -30,10 +17,7 @@ services:
restart: unless-stopped
backend-api:
build:
context: ../..
dockerfile: docker/app/Dockerfile.backend
image: yg-ft-backend-api:latest
image: ${BACKEND_API_IMAGE:-yg-ft-backend-api:latest}
container_name: yg-ft-backend-api
depends_on:
postgres:
@@ -42,6 +26,8 @@ services:
condition: service_healthy
expose:
- "8000"
ports:
- "${BACKEND_API_PORT:-17861}:8000"
environment:
APP_ENV: ${APP_ENV:-prod}
APP_NAME: ${APP_NAME:-YG Fine-Tune Platform API}
@@ -88,6 +74,8 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
- ../../docs/postgres-schema.sql:/docker-entrypoint-initdb.d/001-schema.sql:ro
ports:
- "${POSTGRES_PORT:-15432}:5432"
networks:
- yg-ft-app
healthcheck:
@@ -103,6 +91,8 @@ services:
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis_data:/data
ports:
- "${REDIS_PORT:-16379}:6379"
networks:
- yg-ft-app
healthcheck:
@@ -117,6 +107,5 @@ networks:
name: yg-ft-app
volumes:
frontend_node_modules:
postgres_data:
redis_data: