-
Notifications
You must be signed in to change notification settings - Fork 3
/
compose.yml
78 lines (72 loc) · 1.54 KB
/
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
services:
redis:
image: redis:7.0
restart: always
db:
image: mariadb:11.4
restart: always
environment:
- MARIADB_ROOT_PASSWORD=${DB_PASSWORD}
volumes:
- 'db-data:/var/lib/mysql:Z'
- './db-entrypoint.sql:/docker-entrypoint-initdb.d/db-entrypoint.sql'
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 5s
interval: 5s
timeout: 5s
retries: 10
celery:
build: ./site
stdin_open: true
env_file:
- .env
command: celery -A dmoj_celery worker
depends_on:
- redis
site:
build: ./site
restart: always
stdin_open: true
env_file:
- .env
volumes:
- './setup-db.sh:/setup-db.sh'
command: /setup-db.sh
ports:
- 8000:8000
healthcheck:
test: ["CMD", "curl", "localhost:8000"]
start_period: 5s
interval: 5s
timeout: 5s
retries: 20
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
celery:
condition: service_started
bridged:
build: ./site
restart: always
stdin_open: true
env_file:
- .env
command: python3 manage.py runbridged
depends_on:
site:
condition: service_healthy
judge:
build: ./judge
restart: always
volumes:
- ./problems:/problems
cap_add:
- SYS_PTRACE
command: run -c /problems/judge.yml bridged ${JUDGE_NAME} ${JUDGE_KEY}
depends_on:
- bridged
volumes:
db-data: