mirror of
https://github.com/QingdaoU/OnlineJudgeDeploy.git
synced 2024-12-28 07:21:56 +00:00
remove $PWD
This commit is contained in:
parent
4781112023
commit
370da2b55c
@ -27,8 +27,7 @@ Windows 下的安装仅供体验,勿在生产环境使用。如有必要,请
|
||||
2. 右击右下角 Docker 图标,选择 Settings 进行设置
|
||||
3. 选择 `Shared Drives` 菜单,之后勾选你想安装 OJ 的盘符位置(例如勾选D盘),点击 `Apply`
|
||||
4. 输入 Windows 的账号密码进行文件共享
|
||||
5. 启动 `PowerShell`,输入`$env:PWD='{your path}'`, `{your path}`代表你想安装的目录。注意!目录必须在你共享的盘符中(例如设置`D:\qduoj`)。由于你创建的是临时环境变量,`PowerShell`关闭则临时变量作废,因此每次启动前必须重新设置过。当然你也可以选择在Win的环境变量中永久添加名为`PWD`的环境变量(与JDK设置方法相同)。
|
||||
6. 安装 `Python`、`pip`、`git`、`docker-compose`,安装方法自行搜索。
|
||||
5. 安装 `Python`、`pip`、`git`、`docker-compose`,安装方法自行搜索。
|
||||
|
||||
## 开始安装
|
||||
|
||||
@ -44,8 +43,6 @@ Windows 下的安装仅供体验,勿在生产环境使用。如有必要,请
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
> 对于非root用户,请用 `sudo -E docker-compose up -d`,否则不会传递当前的 `$PWD` 环境变量。
|
||||
|
||||
根据网速情况,大约5到30分钟就可以自动搭建完成,全程无需人工干预。
|
||||
|
||||
等命令执行完成,然后运行 `docker ps -a`,当看到所有的容器的状态没有 `unhealthy` 或 `Exited (x) xxx` 就代表 OJ 已经启动成功。
|
||||
|
@ -6,14 +6,14 @@ services:
|
||||
container_name: oj-redis
|
||||
restart: always
|
||||
volumes:
|
||||
- $PWD/data/redis:/data
|
||||
- ./data/redis:/data
|
||||
|
||||
oj-postgres:
|
||||
image: postgres:10-alpine
|
||||
container_name: oj-postgres
|
||||
restart: always
|
||||
volumes:
|
||||
- $PWD/data/postgres:/var/lib/postgresql/data
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=onlinejudge
|
||||
- POSTGRES_USER=onlinejudge
|
||||
@ -34,9 +34,9 @@ services:
|
||||
tmpfs:
|
||||
- /tmp
|
||||
volumes:
|
||||
- $PWD/data/backend/test_case:/test_case:ro
|
||||
- $PWD/data/judge_server/log:/log
|
||||
- $PWD/data/judge_server/run:/judger
|
||||
- ./data/backend/test_case:/test_case:ro
|
||||
- ./data/judge_server/log:/log
|
||||
- ./data/judge_server/run:/judger
|
||||
environment:
|
||||
- SERVICE_URL=http://judge-server:8080
|
||||
- BACKEND_URL=http://oj-backend:8000/api/judge_server_heartbeat/
|
||||
@ -52,7 +52,7 @@ services:
|
||||
- oj-postgres
|
||||
- judge-server
|
||||
volumes:
|
||||
- $PWD/data/backend:/data
|
||||
- ./data/backend:/data
|
||||
environment:
|
||||
- POSTGRES_DB=onlinejudge
|
||||
- POSTGRES_USER=onlinejudge
|
||||
|
Loading…
Reference in New Issue
Block a user