generated from osamhack2021/Repo_Sample-Technology_ProjectName_TeamName
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
146 lines (134 loc) · 3.11 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3"
services:
oj-redis:
image: redis:4.0-alpine
container_name: oj-redis
restart: always
networks:
- storage
volumes:
- oj-redis-data:/data
oj-postgres:
image: postgres:10-alpine
container_name: oj-postgres
restart: always
networks:
- storage
volumes:
- oj-postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=onlinejudge
- POSTGRES_USER=onlinejudge
- POSTGRES_PASSWORD=onlinejudge
oj-judge-server:
build: ./JudgeServer
image: oj/judge-server
container_name: oj-judge-server
restart: always
read_only: true
cap_drop:
- SETPCAP
- MKNOD
- NET_BIND_SERVICE
- SYS_CHROOT
- SETFCAP
- FSETID
tmpfs:
- /tmp
networks:
- backend
volumes:
- ./data/backend/test_case:/test_case:ro
- ./data/judge_server/log:/log
- ./data/judge_server/run:/judger
environment:
- SERVICE_URL=http://oj-judge-server:8080
- BACKEND_URL=http://oj-backend:8000/api/judge_server_heartbeat/
- TOKEN=e23db591aae7131eaff626d896a30c440435524acfc837224f5391709a15fa63
oj-frontend:
build: ./OnlineJudgeFE
image: oj/frontend
container_name: oj-frontend-dist
restart: "no"
networks:
- frontend
volumes:
- ./data/frontend:/app/dist
environment:
- NODE_ENV=production
oj-backend:
build: ./OnlineJudge
image: oj/backend
container_name: oj-backend
restart: always
depends_on:
- oj-redis
- oj-postgres
- oj-frontend
- oj-judge-server
networks:
- storage
- backend
volumes:
- ./data/backend:/data
- ./data/frontend:/front
environment:
- POSTGRES_DB=onlinejudge
- POSTGRES_USER=onlinejudge
- POSTGRES_PASSWORD=onlinejudge
- JUDGE_SERVER_TOKEN=e23db591aae7131eaff626d896a30c440435524acfc837224f5391709a15fa63
ports:
- "0.0.0.0:80:8000"
judge0-server:
image: judge0/judge0:latest
container_name: judge0-server
networks:
- judge0
volumes:
- ./Judge0/judge0.conf:/judge0.conf:ro
ports:
- "2358:2358"
privileged: true
restart: always
judge0-worker:
image: judge0/judge0:latest
container_name: judge0-worker
command: [ "./scripts/workers" ]
networks:
- judge0
volumes:
- ./Judge0/judge0.conf:/judge0.conf:ro
privileged: true
restart: always
judge0-postgres:
image: postgres:13.0
container_name: judge0-postgres
env_file: ./Judge0/judge0.conf
networks:
- judge0
volumes:
- judge0-postgres-data:/var/lib/postgresql/data/
restart: always
judge0-redis:
image: redis:6.0
container_name: judge0-redis
command: [
"bash", "-c",
'docker-entrypoint.sh --appendonly yes --requirepass "$$REDIS_PASSWORD"'
]
env_file: ./Judge0/judge0.conf
networks:
- judge0
volumes:
- judge0-redis-data:/data
restart: always
networks:
storage:
backend:
frontend:
judge0:
volumes:
oj-postgres-data:
oj-redis-data:
judge0-postgres-data:
judge0-redis-data: