Files
Aliyun-VOD-Media-Library-Ma…/docs/deploy.md
T
2026-06-29 17:46:43 +06:00

90 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 部署文档
## Docker Compose 部署
### 1. 准备环境
确保已安装 Docker 与 Docker Compose。
### 2. 下载并配置
```bash
git clone https://github.com/your-org/Aliyun-VOD-Media-Library-Manager.git
cd Aliyun-VOD-Media-Library-Manager/docker
cp .env.example .env
```
编辑 `.env`
```env
JWT_SECRET=your-random-secret-key-min-32-chars
APP_ENCRYPTION_KEY=your-32-char-encryption-key
DEFAULT_ADMIN_USERNAME=admin
DEFAULT_ADMIN_PASSWORD=your-strong-password
```
### 3. 启动
```bash
docker-compose up -d
```
### 4. 访问
打开浏览器访问 `http://<服务器IP>:3001`
### 5. 更新
```bash
docker-compose pull
docker-compose up -d
```
## 源码部署
### 环境要求
- Node.js >= 20
- npm >= 10
### 步骤
```bash
npm install
# 后端
npm run dev -w apps/server
# 前端(新终端)
npm run dev -w apps/web
```
生产构建:
```bash
npm run build
npm run start -w apps/server
```
## Nginx 反向代理(可选)
```nginx
server {
listen 80;
server_name vod.example.com;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
```
建议配合 Let's Encrypt 开启 HTTPS。
## 数据备份
SQLite 数据文件默认位于 `apps/server/data/vod-manager.db`Docker 部署时通过 volume 映射到 `./data`。建议定期备份该文件。