forked from judge0/judge0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.standalone.yml
70 lines (61 loc) · 1.27 KB
/
docker-compose.standalone.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
version: "2"
x-logging: &logging
logging:
driver: json-file
options:
max-size: 100M
x-db: &db
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_DB: judge0
POSTGRES_USER: judge0
POSTGRES_PASSWORD: YourPasswordHere1234
x-redis: &redis
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: YourPasswordHere1234
x-config: &config
JUDGE0_CONFIGURATION_OPTIONS_HELP: https://github.com/judge0/judge0/blob/master/judge0.conf
services:
server:
image: judge0/judge0:latest
environment:
<<: *config
<<: *db
<<: *redis
ports:
- "2358:2358"
privileged: true
<<: *logging
restart: always
worker:
image: judge0/judge0:latest
command: ["./scripts/workers"]
environment:
<<: *config
<<: *db
<<: *redis
privileged: true
<<: *logging
restart: always
db:
image: postgres:13.0
environment: *db
volumes:
- postgres-data:/var/lib/postgresql/data/
<<: *logging
restart: always
redis:
image: redis:6.0
command: [
"bash", "-c",
'docker-entrypoint.sh --appendonly yes --requirepass "$$REDIS_PASSWORD"'
]
environment: *redis
volumes:
- redis-data:/data
<<: *logging
restart: always
volumes:
postgres-data:
redis-data: