Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (102 loc) · 2.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
110 lines (102 loc) · 2.3 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
services:
test-db:
extends:
file: docker-compose.base.yml
service: db-base
profiles:
- test
ports:
- "127.0.0.1:5432:5432"
db:
extends:
file: docker-compose.base.yml
service: db-base
container_name: quotient-database
restart: always
volumes:
- db_data:/var/lib/postgresql/data
server:
container_name: quotient-server
image: quotient-server
build:
context: .
dockerfile: Dockerfile
restart: always
env_file:
- .env
ports:
- 80:80
depends_on:
db:
condition: service_healthy
networks:
- quotient-network
volumes:
- ./submissions:/app/submissions
- ./config:/app/config
- ./engine:/app/engine
- ./static:/app/static
- ./custom-checks:/app/checks:ro
test-redis:
extends:
file: docker-compose.base.yml
service: redis-base
profiles:
- test
ports:
# Don't conflict with actual redis instance
- "127.0.0.1:6380:6379"
redis:
extends:
file: docker-compose.base.yml
service: redis-base
restart: always
container_name: quotient-redis
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
runner:
build:
context: .
dockerfile: Dockerfile.runner
deploy:
mode: replicated
replicas: 5 # Adjust based on server resources
restart: always
privileged: false # disable unless a runner needs priv access (e.g. wireguard)
env_file:
- .env
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
networks:
- quotient-network
volumes:
- ./submissions:/app/submissions
- ./custom-checks:/app/checks
- ./config/scoredfiles:/app/config/scoredfiles
tmpfs:
- /tmp:size=32m
divisor:
build:
context: divisor/
dockerfile: Dockerfile
restart: always
env_file:
- .env
network_mode: host # Use host networking for divisor
depends_on:
redis:
condition: service_healthy
privileged: true # Needed to manage networks
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Needed to read runner names
networks:
quotient-network:
driver: bridge
volumes:
db_data:
redis_data: