-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (86 loc) · 2.56 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: "3"
services:
Element-redis:
image: redis:5.0.4
container_name: Element-redis
restart: always
tty: true
command: redis-server --requirepass acm1234@
volumes:
- ./sql/redis/data:/data
# - ./sql/redis/config/redis.conf:/usr/local/etc/redis/redis.conf
# ports:
# - "6379:6379"
Element-mongodb:
image: mongo
container_name: Element-mongodb
restart: always
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: ctguacm1234@
volumes:
- ./sql/mongodb/data:/data/db
Element-mysql:
container_name: Element-mysql # 指定容器的名称
restart: always
image: mysql:8.0 # 指定镜像和版本
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
environment:
MYSQL_ROOT_PASSWORD: ctguacm1234@
ports:
- "3306:3306"
volumes:
- ./sql/mysql/data:/var/lib/mysql # 挂载数据目录
- ./sql/mysql/init:/docker-entrypoint-initdb.d/
Element-front-backend:
image: registry.cn-qingdao.aliyuncs.com/elementoj/elementoj_front-backend:1.0
container_name: Element-front-backend
restart: always
tty: true
depends_on:
- Element-redis
- Element-mysql
- Element-judgeserver
- Element-mongodb
volumes:
- ./testcase/in:/test_case/in
- ./testcase/user_out:/test_case/user_out
- ./testcase/out:/test_case/out
- ./testcase/sample:/test_case/sample
- ./web/backend:/usr/local/apache-tomcat-8.5.69/webapps # 挂载代码目录
- ./bin/comparator:/usr/lib/comparator # 挂载代码目录
- ./src:/var/www/html
ports:
- "8080:8080"
- "80:80"
Element-judgeserver:
image: registry.cn-qingdao.aliyuncs.com/elementoj/elementoj_judge-server:1.0
container_name: Element-judgeserver
tty: true
restart: always
cap_drop:
- SETPCAP
- MKNOD
- NET_BIND_SERVICE
- SYS_CHROOT
- SETFCAP
- FSETID
depends_on:
- Element-mysql
- Element-mongodb
ports:
- "4399:8080"
volumes:
- ./testcase/in:/test_case/in
- ./testcase/user_out:/test_case/user_out
- ./judge/log:/log
- ./judge/run:/judger
- ./web/judgeserver:/usr/local/apache-tomcat-8.5.69/webapps # 挂载代码目录
- ./bin/judger:/usr/lib/judger # 挂载代码目录
environment:
- TOKEN=CHANGE_THIS