Files
XH-XunKe/docs/DEPLOYMENT.md
T

23 lines
769 B
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.
# 部署
复制 `.env.example` 为 `.env`,替换管理员密码、`JWT_SECRET`、`APP_ENCRYPTION_KEY`、LiveKit 和 MinIO 密钥。确认无误后再把 `APP_PROD_GUARD=true`。
```powershell
docker compose --env-file .env up --build
```
- 网站:`http://localhost:8088`
- 后端:`http://localhost:8080`
- MinIO 控制台:`http://localhost:9001`
- LiveKit:`ws://localhost:7880`,UDP `50000-50100`
校内部署时,把 `deploy/livekit.yaml` 的 `rtc.node_ip` 设成教师和学生浏览器都能访问的地址。跨 NAT 需要单独的 TURN,不能假设 HTTPS 足够。
数据库备份:
```powershell
docker compose exec postgres pg_dump -U xuenke xuenke > backup.sql
```
录像保留天数来自学校设置,过期任务每天 02:30 清理。