-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
112 lines (104 loc) · 2.06 KB
/
compose.yaml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
services:
mongodb:
container_name: mongodb
image: mongo:latest
restart: always
volumes:
- mongodb:/data/judge/db
ports:
- 27017:27017
networks:
- app-network
# api:
# build: .
# container_name: logiclab
# restart: always
# ports:
# - 3000:3000
# volumes:
# - .:/app
# depends_on:
# - mongodb
# environment:
# MONGODB_URI: mongodb://mongodb:27017
# DB_NAME: judge
# networks:
# - app-network
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
networks:
- app-network
server:
image: judge0/judge0:1.13.1
volumes:
- ./judge0.conf:/judge0.conf:ro
- ./problems:/problems:ro
ports:
- "2358:2358"
privileged: true
restart: always
logging:
driver: none
networks:
- app-network
workers:
image: judge0/judge0:1.13.1
command: ["./scripts/workers"]
volumes:
- ./judge0.conf:/judge0.conf:ro
- ./problems:/problems:ro
privileged: true
restart: always
logging:
driver: none
networks:
- app-network
redis:
image: redis:7.2.4
container_name: redis
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
networks:
- app-network
# Redis insight
redis-insight:
image: redis/redisinsight:latest
restart: always
ports:
- "5540:5540"
# volumes:
# - redis-insight:/data
volumes:
mongodb: {}
postgres_data: {}
cache:
driver: local
networks:
app-network:
driver: bridge