forked from codechefPesuecc/CodeChef-PESUECC-Chapter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (30 loc) · 1.25 KB
/
Copy pathdocker-compose.yml
File metadata and controls
31 lines (30 loc) · 1.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
# The only containerised service is the Piston code-execution sandbox.
# The Next.js app and its SQLite database run natively on Node (npm run dev).
#
# docker compose up -d # start the judge
# ./scripts/install-runtimes.sh # one-time: install language runtimes
# npm run dev # run the app on the host
# curl localhost:3000/api/health # verify app <-> db <-> piston
services:
piston:
image: ghcr.io/engineer-man/piston
# Piston needs privileged mode for its sandbox isolation (nsjail).
privileged: true
environment:
# Raise the per-run cap (default 3000ms) so per-problem time limits up to
# 10s are honoured. The submit/run routes pass each problem's own limit.
- PISTON_RUN_TIMEOUT=10000
- PISTON_COMPILE_TIMEOUT=20000
# Ceiling for per-run memory (512 MiB). The judge passes each problem's own
# memory limit (default 256 MiB) per request, which must be <= this cap.
- PISTON_RUN_MEMORY_LIMIT=536870912
# Published on localhost so the Node app and the install script can reach it.
ports:
- "127.0.0.1:2000:2000"
volumes:
- piston-packages:/piston/packages
tmpfs:
- /tmp:exec
restart: unless-stopped
volumes:
piston-packages: