-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
103 lines (93 loc) · 2.05 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
x-build-context: &x-build-context
context: ./docker
dockerfile: Dockerfile
x-common-depends: &x-common-depends
db:
condition: service_healthy
redis:
condition: service_healthy
x-common: &x-common
depends_on:
<<: *x-common-depends
env_file:
- .env
environment:
REDIS_HOST: redis
volumes:
- ./docker:/app
- ./beatmaps:/beatmaps
- ./sql:/sql
build:
<<: *x-build-context
target: base
services:
db:
image: mysql:8.0
env_file:
- .env
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
healthcheck:
test: [ "CMD", "mysqladmin", "ping" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- database:/var/lib/mysql
- ./db:/etc/mysql/conf.d
ports:
- "${DB_PORT:-0}:3306"
command: ['--innodb-buffer-pool-size=${INNODB_BUFFER_SIZE}']
redis:
image: redis:latest
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "${REDIS_PORT:-0}:6379"
# Database setup
setup:
<<: *x-common
working_dir: '/app/setup'
command: [ './import.sh' ]
# Verify scores
verify:
<<: *x-common
working_dir: '/app/verify'
command: [ './start.sh' ]
# Difficulty calculation
diffcalc:
<<: *x-common
working_dir: '/app/diffcalc'
command: [ './start.sh' ]
# Performance points calculation
ppcalc:
<<: *x-common
working_dir: '/app/ppcalc'
command: [ './start.sh' ]
# Spreadsheet generator
generator:
<<: *x-common
build:
<<: *x-build-context
target: generator
depends_on:
<<: *x-common-depends
# To support running `docker-compose up generator`...
setup:
condition: service_started
verify:
condition: service_started
diffcalc:
condition: service_started
ppcalc:
condition: service_started
working_dir: '/app/generator'
volumes:
- ./docker:/app
- ${GOOGLE_CREDENTIALS_FILE}:/credentials.json
command: [ './start.sh' ]
volumes:
database: