-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
108 lines (95 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
91
92
93
94
95
96
97
98
99
100
101
102
version: "2"
services:
teach-system-mysql:
image: mysql:5.7.25
container_name: teach-system-mysql
volumes:
- /etc/localtime:/etc/localtime
- ./timezone:/ect/timezone
- ./files/mysql/data:/var/lib/mysql
- ./files/mysql/my.cnf:/etc/mysql/my.cnf
environment:
- MYSQL_ROOT_PASSWORD=$MYSQL_PASS
ports:
- 3306:3306
networks:
- teachSystem
teach-system-redis:
image: redis:3.2.10
container_name: teach-system-redis
networks:
- teachSystem
volumes:
- /etc/localtime:/etc/localtime
- ./timezone:/ect/timezone
- ./files/redis/data:/data
- ./files/redis/redis.conf:/etc/redis/redis.conf
ports:
- 6379:6379
command: redis-server /etc/redis/redis.conf
teach-system-front:
image: nginx
container_name: teach-system-front
depends_on:
- teach-system-backend
networks:
- teachSystem
volumes:
- /etc/localtime:/etc/localtime
- ./timezone:/ect/timezone
- ./client/dist:/opt/dist
- ./files/front/log:/var/log/nginx
- ./files/front/nginx.conf:/etc/nginx/nginx.conf
ports:
- 8085:8080
teach-system-backend:
image: registry.cn-hangzhou.aliyuncs.com/fleyx/node:v1
container_name: teach-system-backend
depends_on:
- teach-system-mysql
- teach-system-redis
networks:
- teachSystem
environment:
- mysqlHost=teach-system-mysql
- redisHost=teach-system-redis
- mysqlPassword=$MYSQL_PASS
- judgeToken=$JUDGE_TOKEN
- judgeUrl=http://judge-server:8080
- testSavePath=/opt/tests/test_case
volumes:
- /etc/localtime:/etc/localtime
- ./timezone:/ect/timezone
- ./teachSystem:/opt/workspace
- ./JudgeServer/tests/:/opt/tests
ports:
- 8089:8088
command: "/bin/bash /opt/start.sh"
# 启动判题核心
judge-server:
image: registry.cn-hangzhou.aliyuncs.com/onlinejudge/judge_server
container_name: judge-server
read_only: true
networks:
- teachSystem
cap_drop:
- SETPCAP
- MKNOD
- NET_BIND_SERVICE
- SYS_CHROOT
- SETFCAP
- FSETID
tmpfs:
- /tmp
volumes:
- ../JudgeServer/tests/test_case:/test_case:ro
- ../JudgeServer/log:/log
- ../JudgeServer/run:/judger
environment:
- BACKEND_URL=http://backend:80/api/judge_server_heartbeat
- SERVICE_URL=http://judge-server:12358
- TOKEN=$JUDGE_TOKEN
ports:
- "0.0.0.0:12358:8080"
networks:
teachSystem: