forked from Ashutoshpadhi629/algorithmic-arena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (78 loc) · 1.81 KB
/
docker-compose.yml
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
version: '3.5'
services:
# Next Auth Not Working in Docker
# app:
# build:
# context: .
# dockerfile: Dockerfile
# container_name: app-container
# environment:
# - DATABASE_URL=postgresql://postgres:supersecurepassword@db:5432/algo-arena
# ports:
# - '3000:3000' # Next.js app
# depends_on:
# db:
# condition: service_healthy
# volumes:
# - type: bind
# source: .
# target: /usr/src/app
db:
image: postgres:alpine
container_name: db
restart: always
env_file: judge0.conf
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER']
interval: 10s
timeout: 5s
retries: 5
logging:
driver: none
server:
image: judge0/judge0:1.13.1
volumes:
- ./judge0.conf:/judge0.conf:ro
- type: bind
source: "##YOUR_LOCAL_PATH_TO_PROBLEMS_DIR## [repo]/apps/problems"
target: /dev/problems
ports:
- "2358:2358"
privileged: true
restart: always
logging:
driver: none
workers:
image: judge0/judge0:1.13.1
command: ["./scripts/workers"]
volumes:
- ./judge0.conf:/judge0.conf:ro
- type: bind
source: "##YOUR_LOCAL_PATH_TO_PROBLEMS_DIR## [repo]/apps/problems"
target: /dev/problems
privileged: true
restart: always
logging:
driver: none
redis:
image: redis:7.2.4
command: [
"bash", "-c",
'docker-entrypoint.sh --appendonly no --requirepass "$$REDIS_PASSWORD"'
]
env_file: judge0.conf
restart: always
ports:
- '6379:6379'
logging:
driver: none
volumes:
- cache:/data
volumes:
postgres_data:
cache:
driver: local