-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
66 lines (60 loc) · 1.64 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
version: '3.9'
x-env: &x-env
DB_CONNECTION_STRING: Server=db;Database=osu;Uid=osuweb;
DB_HOST: db
DB_USERNAME: 'root'
APP_ENV: 'local'
GITHUB_TOKEN: "${GITHUB_TOKEN}"
BROADCAST_DRIVER: redis
CACHE_DRIVER: redis
NOTIFICATION_REDIS_HOST: redis
REDIS_HOST: redis
SESSION_DRIVER: redis
MYSQL_DATABASE: 'osu'
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_ROOT_HOST: '%'
services:
# just a placeholder service to ensure we wait for migrator to complete successfully.
ready_for_use:
image: hello-world:latest
depends_on:
migrator:
condition: service_completed_successfully
migrator:
image: pppy/osu-web:latest-dev
command: ['artisan', 'db:setup']
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
environment:
<<: *x-env
db:
image: mysql/mysql-server:8.0
environment:
<<: *x-env
volumes:
- database:/var/lib/mysql
ports:
- "${MYSQL_EXTERNAL_PORT:-3306}:3306"
command: --default-authentication-plugin=mysql_native_password
healthcheck:
# important to use 127.0.0.1 instead of localhost as mysql starts twice.
# the first time it listens on sockets but isn't actually ready
# see https://github.com/docker-library/mysql/issues/663
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
interval: 1s
timeout: 60s
start_period: 60s
redis:
image: redis:latest
ports:
- "${REDIS_EXTERNAL_PORT:-6379}:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 1s
timeout: 60s
start_period: 60s
volumes:
database: