forked from judge0/judge0
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
89 lines (82 loc) 路 2.25 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
89 lines (82 loc) 路 2.25 KB
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
version: "2"
services:
nginx:
image: judge0/nginxproxy-nginx-proxy:latest-2021-04-26
environment:
DEFAULT_HOST: judge0.local
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- "80:80"
restart: always
judge0:
# Built from NewtonDockerfile. Build locally before bringing the stack up:
# docker buildx build --platform linux/arm64 \
# -f NewtonDockerfile -t newtonschool/newton-judge0:0.76 --load .
# (use --platform linux/amd64 on EC2 / prod build hosts)
image: newtonschool/newton-judge0:0.76
environment:
VIRTUAL_HOST: judge0.local
volumes:
- .:/api
ports:
- "2358:2358"
- "3001:3001" # For ./scripts/dev/serve-docs
privileged: true
db:
image: postgres:13.0
env_file: judge0.conf
volumes:
- postgres-data:/var/lib/postgresql/data/
restart: always
# Local dev only: side services rarely use >100 MB; capping leaves
# the rest of the Docker Desktop allocation free for the judge0
# sandbox (which JVM/Erlang/etc. each pre-reserve >1 GiB on init).
mem_limit: 512m
# Not actually currently used. Just for testing purposes in development.
pgbouncer:
image: pgbouncer/pgbouncer:1.14.0
environment: # DATABASES_* are the same as from judge0.conf
DATABASES_HOST: db
DATABASES_PORT: 5432
DATABASES_DBNAME: judge0
DATABASES_USER: judge0
DATABASES_PASSWORD: YourPasswordHere1234
PGBOUNCER_LISTEN_PORT: 5432 # Set the same as Postgres
restart: always
redis:
image: redis:6.0
command:
[
"bash",
"-c",
'docker-entrypoint.sh --appendonly yes --requirepass "$$REDIS_PASSWORD"',
]
env_file: judge0.conf
volumes:
- redis-data:/data
restart: always
mem_limit: 256m
redis-sidecar:
image: redis:6.2.6
command: --port 6380
volumes:
- redis-data:/data-sidecar
restart: always
mem_limit: 256m
resque:
image: ennexa/resque-web:latest
entrypoint: ""
command:
[
"bash",
"-c",
"resque-web -FL -r redis://:$$REDIS_PASSWORD@$$REDIS_HOST:$$REDIS_PORT",
]
env_file: judge0.conf
ports:
- "5678:5678"
restart: always
volumes:
postgres-data:
redis-data: