-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
72 lines (69 loc) · 1.88 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: "3"
services:
db:
image: mysql:8.0.19
container_name: db1
ports:
- 13306:3306
volumes:
- e:\docker\mysql:/var/lib/mysql # data storage path # on Windows
# - /mysql:/var/lib/mysql # on Linux
restart: always
environment:
- MYSQL_ROOT_PASSWORD=1234 # should change
- MYSQL_DATABASE=oj
- MYSQL_USER=user # optional
- MYSQL_PASSWORD=1234 # optional
- TZ=Asia/Shanghai
- LC_ALL=C
command: [
"--default-authentication-plugin=mysql_native_password",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_bin"]
judgerserver:
image: registry.cn-hangzhou.aliyuncs.com/jinmingyi/judgerserver
container_name: judger
volumes:
- e:\docker\ojdata:/ojdata # problem test data path # on Windows
# - /ojdata:/ojdata # on Linux
ports:
- 12345:12345
- 8000:8000
restart: always
environment:
- PASSWORD=iAMaPASSWORD # should change
- SERVICE_PORT=12345
- OJ_BACKEND_CALLBACK=http://onlinejudge:8080/judge/callback
- TZ=Asia/Shanghai
- LC_ALL=C
redis:
image: redis:latest
container_name: redis1
environment:
- TZ=Asia/Shanghai
- LC_ALL=C
- LANG=zh_CN.UTF-8
onlinejudge:
image: registry.cn-hangzhou.aliyuncs.com/jinmingyi/onlinejudge
container_name: oj
depends_on:
- db
- judgerserver
- redis
ports:
- 8080:8080
volumes:
- e:\docker\onlinejudge:/onlinejudge # on Windows
# - /onlinejudge:/onlinejudge # on Linux
restart: always
environment:
- TZ=Asia/Shanghai
- LC_ALL=C
- LANG=zh_CN.UTF-8
- MYSQL_USER=root
- MYSQL_PASSWORD=1234
- MYSQL_URL=db:3306/oj
- REDIS_URL=redis
- REDIS_PORT=6379
- JUDGER_SERVICE=http://judgerserver:12345/judge
- ADMIN_PASSWORD=123456