-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (33 loc) · 1022 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (33 loc) · 1022 Bytes
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
services:
backend:
build:
context: .
dockerfile: server.Dockerfile
container_name: coderunner-backend
environment:
- NODE_ENV=production
- PORT=3100
- ADMIN_KEY=${ADMIN_KEY:-development_key}
volumes:
# Mount the Docker socket so the backend can spawn execution containers
- /var/run/docker.sock:/var/run/docker.sock
# Mount the runtimes directory so the backend can build language images on startup
- ./runtimes:/app/server/runtimes
healthcheck:
test: [ "CMD", "node", "-e", "fetch('http://localhost:3100/api/health').then(r => { if (!r.ok) process.exit(1) }).catch(() => process.exit(1))" ]
interval: 15s
timeout: 5s
retries: 5
start_period: 120s
restart: unless-stopped
frontend:
build:
context: .
dockerfile: client.Dockerfile
container_name: coderunner-frontend
ports:
- "3101:80"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped