-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
75 lines (71 loc) · 1.98 KB
/
docker-compose.yaml
File metadata and controls
75 lines (71 loc) · 1.98 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
# Tako VM Docker Compose
#
# Start everything:
# docker-compose up -d
#
# Build and start:
# docker-compose up -d --build
#
# View logs:
# docker-compose logs -f tako-vm
services:
tako-vm:
build:
context: .
dockerfile: docker/Dockerfile.server
image: tako-vm-server:latest
container_name: tako-vm
ports:
- "8000:8000"
volumes:
# Docker socket for spawning executor containers
- /var/run/docker.sock:/var/run/docker.sock
# Shared workspace for job files (must match host path for Docker mounts)
- /tmp/tako-vm-jobs:/tmp/tako-vm-jobs
# Config with scaled worker settings (16 workers, 500 queue)
- ./tako_vm.yaml:/app/tako_vm.yaml:ro
# Optional: persist data
# - tako-vm-data:/root/.tako_vm
environment:
- PYTHONUNBUFFERED=1
# Use shared workspace path for job files
- TAKO_VM_WORKSPACE=/tmp/tako-vm-jobs
- TAKO_VM_DATABASE_URL=postgresql://postgres:postgres@postgres:5432/tako_vm
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
postgres:
image: postgres:16-alpine
container_name: tako-vm-postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=tako_vm
ports:
- "5432:5432"
volumes:
- tako-vm-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d tako_vm"]
interval: 10s
timeout: 5s
retries: 5
# Build executor image (run once, then remove)
executor-build:
build:
context: .
dockerfile: docker/Dockerfile.executor
image: code-executor:latest
entrypoint: [] # Override entrypoint so we can just echo
command: ["echo", "Executor image built"]
profiles:
- build
# Optional: persist data
volumes:
tako-vm-postgres-data: