From 21e4098ffc7638774bc9a6f00c20d4398affd87e Mon Sep 17 00:00:00 2001 From: zema1 Date: Sun, 10 Dec 2017 10:41:58 +0800 Subject: [PATCH] update upgrade.md --- docs/onlinejudge/guide/upgrade.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/onlinejudge/guide/upgrade.md b/docs/onlinejudge/guide/upgrade.md index 937b167..c1c792b 100644 --- a/docs/onlinejudge/guide/upgrade.md +++ b/docs/onlinejudge/guide/upgrade.md @@ -4,14 +4,22 @@ # 升级步骤 -若您是按照[部署说明](https://github.com/QingdaoU/OnlineJudgeDeploy)搭建的,直接在`OnlineJudgeDeploy`运行`docker-compose pull`,之后运行`docker-compose up -d`启动容器即可。 +!> 一下方法仅适用于用官方[部署脚本](https://github.com/QingdaoU/OnlineJudgeDeploy)搭建的OJ -一般来说`Redis`和`Postgresql`的镜像无需更新,可对Docker镜像单独pull, 只更新`judge_server`和`oj-backend`: +如果对部署仓库代码有改动,请自行备份或`git stash`,然后在 OnlineJudgeDeploy目录运行下列命令即可完成升级: ```bash +git pull +docker-compose pull && docker-compose up -d +``` + +不过一般来说`Redis`和`Postgresql`的镜像无需更新,因此可对OJ相关镜像单独pull, 这样可以节约升级时间, 这和上述命令在大多数情况下达到的效果是一样的(除非大版本升级): + +```bash +git pull docker pull registry.cn-hangzhou.aliyuncs.com/onlinejudge/judge_server docker pull registry.cn-hangzhou.aliyuncs.com/onlinejudge/oj_backend +docker-compose up -d ``` -之后运行`docker-compose up -d`即可 如果还有任何问题,请提出issue。 \ No newline at end of file