This commit is contained in:
2026-04-09 08:52:40 +00:00
parent b80e97799f
commit 880f5caf2d
8 changed files with 144 additions and 2 deletions

View File

@@ -130,13 +130,16 @@ vplatform/
│ │ ├── config.py
│ │ ├── main.py
│ │ └── schemas.py
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── styles.css
│ ├── Dockerfile
│ ├── index.html
│ ├── nginx.conf
│ ├── package.json
│ └── vite.config.js
├── storage/
@@ -144,8 +147,10 @@ vplatform/
│ ├── hls/
│ ├── processed/
│ └── uploads/
├── .dockerignore
├── .gitignore
├── README.md
├── docker-compose.yml
└── prompt.md
```
@@ -194,6 +199,27 @@ npm run dev
- 后端http://localhost:8000
- 健康检查http://localhost:8000/api/health
## Docker 启动
如果你希望在 Ubuntu 24.04 或其他装有 Docker 的环境中快速运行,直接使用:
```bash
docker compose up --build
```
启动后访问:
- 前端http://localhost:8080
- 后端 APIhttp://localhost:8000
- 健康检查http://localhost:8000/api/health
容器方案说明:
- 后端镜像基于 `python:3.12-slim`,容器内安装 `ffmpeg`
- 前端镜像采用 Node 构建 + Nginx 静态托管
- Nginx 会把 `/api``/media` 反向代理到后端容器
- `docker-compose.yml` 把宿主机 `./storage` 挂载到容器 `/app/storage`,所以上传文件和处理结果会保留
## API 说明
### `POST /api/upload`