docker
This commit is contained in:
26
README.md
26
README.md
@@ -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
|
||||
- 后端 API:http://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`
|
||||
|
||||
Reference in New Issue
Block a user