-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (82 loc) · 2.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (82 loc) · 2.38 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: "3.9"
services:
# ─── Application Database ─────────────────────────────────────────────────
mongodb:
image: mongo:7.0
container_name: ai-tutor-mongodb
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
environment:
MONGO_INITDB_DATABASE: ai_tutor
# ─── Cache / Message Broker ───────────────────────────────────────────────
redis:
image: redis:7.2-alpine
container_name: ai-tutor-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
# ─── Judge0 Code Execution ────────────────────────────────────────────────
judge0-server:
image: judge0/judge0:1.13.1
container_name: judge0-server
restart: unless-stopped
ports:
- "2358:2358"
privileged: true
depends_on:
- judge0-db
- judge0-redis
environment:
REDIS_HOST: judge0-redis
REDIS_PORT: 6379
POSTGRES_HOST: judge0-db
POSTGRES_PORT: 5432
POSTGRES_DB: judge0
POSTGRES_USER: judge0
POSTGRES_PASSWORD: judge0pass
volumes:
- ./judge0.conf:/judge0.conf:ro
judge0-workers:
image: judge0/judge0:1.13.1
container_name: judge0-workers
restart: unless-stopped
privileged: true
command: ["./scripts/workers"]
depends_on:
- judge0-server
environment:
REDIS_HOST: judge0-redis
REDIS_PORT: 6379
POSTGRES_HOST: judge0-db
POSTGRES_PORT: 5432
POSTGRES_DB: judge0
POSTGRES_USER: judge0
POSTGRES_PASSWORD: judge0pass
volumes:
- ./judge0.conf:/judge0.conf:ro
judge0-db:
image: postgres:15-alpine
container_name: judge0-db
restart: unless-stopped
environment:
POSTGRES_DB: judge0
POSTGRES_USER: judge0
POSTGRES_PASSWORD: judge0pass
volumes:
- judge0_db_data:/var/lib/postgresql/data
judge0-redis:
image: redis:7.2-alpine
container_name: judge0-redis
restart: unless-stopped
volumes:
- judge0_redis_data:/data
volumes:
mongodb_data:
redis_data:
judge0_db_data:
judge0_redis_data: