add cdn guide

This commit is contained in:
zema1 2018-01-02 20:27:26 +08:00
parent 65b6843ace
commit ac3e7e5c04
2 changed files with 10 additions and 0 deletions

View File

@ -11,6 +11,7 @@
- [内网运行的问题](onlinejudge/guide/intranet_problems.md)
- [代码升级说明](onlinejudge/guide/upgrade.md)
- [HTTPS相关问题](onlinejudge/guide/https.md)
- [使用CDN](onlinejudge/guide/using_cdn.md)
- [常见问题](onlinejudge/faq.md)
- [交流群](onlinejudge/guide/qq_group.md)
- [从旧版迁移](onlinejudge/from_old.md)

View File

@ -0,0 +1,9 @@
# 使用内容分发网络(CDN)
OJ目前仅支持对 Javascript 和 CSS 使用 CDN 加速,即 API 和动态加载的组件依然会从源主机请求,配置很简单,只需修改 OnlineJudgeDeploy 下的 `docker-compose.yml` 文件,将`STATIC_CDN_HOST`设置为自己的 CDN 域名:
```yml
- STATIC_CDN_HOST=cdn.oj.com
```
保存并运行 `docker-compose up -d`即可。