-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpiston-compose.yml
More file actions
36 lines (34 loc) · 1.14 KB
/
Copy pathpiston-compose.yml
File metadata and controls
36 lines (34 loc) · 1.14 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
# Piston — lightweight single-container code execution engine.
# Replaces Judge0. No Postgres, no Redis, no cgroup v1 required.
#
# Run:
# podman compose -f piston-compose.yml up -d
#
# Install language runtimes (one-time, after first start):
# podman exec piston piston ppman install python
# podman exec piston piston ppman install java
# podman exec piston piston ppman install javascript
#
# Or via the HTTP API:
# curl -X POST http://localhost:2000/api/v2/packages \
# -H 'Content-Type: application/json' \
# -d '{"language":"python","version":"3.10.0"}'
#
# Verify runtimes are installed:
# curl http://localhost:2000/api/v2/runtimes | python3 -m json.tool
services:
piston:
image: ghcr.io/engineer-man/piston
container_name: piston
restart: unless-stopped
ports:
- "2000:2000"
privileged: true
security_opt:
- seccomp=unconfined # needed on Podman 5.x for namespace creation
volumes:
- piston_packages:/piston/packages # persists installed language runtimes
tmpfs:
- /piston/jobs # ephemeral job dirs — fast, no disk I/O
volumes:
piston_packages: