-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (63 loc) · 1.6 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
version: '3'
services:
redis:
image: redis:4.0-alpine
container_name: oj-redis
restart: always
volumes:
- ./data/redis:/data
mysql:
image: mysql:5.7
container_name: oj-mysql
restart: always
volumes:
- ./data/mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=PigeonOnlineJudge
- MYSQL_ROOT_HOST=%
- MYSQL_DATABASE=PigeonOnlineJudge
- MYSQL_USER=PigeonOnlineJudge
- MYSQL_PASS=PigeonOnlineJudge
judger:
image: registry.cn-hangzhou.aliyuncs.com/pigeonoj/judger
container_name: oj-judger
restart: always
read_only: true
cap_drop:
- SETPCAP
- MKNOD
- NET_BIND_SERVICE
- SYS_CHROOT
- SETFCAP
- FSETID
tmpfs: /tmp
volumes:
- ./data/backend/testdata:/judger/testdata
- ./data/judger/logs:/judger/logs
- ./data/judger/run:/judger/run
environment:
- SERVICE_URL=http://judger:8080/
- BACKEND_URL=http://backend:8088/api/judger_heartbeat/
- JUDGER_TOKEN=PigeonOnlineJudge
# - DEBUG_MODE=1
backend:
image: registry.cn-hangzhou.aliyuncs.com/pigeonoj/oj-backend
container_name: oj-backend
restart: always
depends_on:
- redis
- mysql
- judger
volumes:
- ./data/backend:/backend
environment:
- JUDGER_TOKEN=PigeonOnlineJudge
- MYSQL_DATABASE=PigeonOnlineJudge
- MYSQL_USER=PigeonOnlineJudge
- MYSQL_PASSWORD=PigeonOnlineJudge
- NUMBERS_OF_JUDGER=1
# - FORCE_HTTPS=1
# - STATIC_CDN_HOST=cdn.pigeonoj.com
ports:
- "80:8088"
- "443:1443"