-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (68 loc) · 1.93 KB
/
docker-compose.yml
File metadata and controls
69 lines (68 loc) · 1.93 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
services:
mysql:
image: mysql:8.0.40
# https://dev.mysql.com/doc/refman/8.0/en/mysql-acid.html
# https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_flush_method
# nosync only for unix, edit for local start on other systems
command: --default-authentication-plugin=mysql_native_password --sync_binlog=0 --innodb_doublewrite=OFF --innodb-flush-log-at-trx-commit=0 --innodb-flush-method=nosync
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=studio
- MYSQL_USER=user
- MYSQL_PASSWORD=password
healthcheck:
test: ["CMD", "/usr/bin/mysql", "-hlocalhost", "-uuser", "-ppassword", "-e", "SELECT 1"]
interval: 30s
timeout: 5s
retries: 3
restart: always
volumes:
- mysql_data:/var/lib/mysql
waitmysql:
image: mysql:8.0.40
links:
- mysql
depends_on:
- mysql
entrypoint:
- bash
- -c
- 'until /usr/bin/mysql -hmysql -uuser -ppassword -e "SELECT 1"; do sleep 5; done'
vitess:
image: vitess/vttestserver:mysql80
platform: linux/amd64
ports:
- "15303:15303" # Base port
- "15304:15304" # vtctld port (PORT+1)
- "15306:15306" # MySQL protocol port (PORT+3, vtgate)
environment:
- PORT=15303
- KEYSPACES=studio
- NUM_SHARDS=1
- MYSQL_BIND_HOST=0.0.0.0
- VTCOMBO_BIND_HOST=0.0.0.0
healthcheck:
test: ["CMD-SHELL", "mysql -h127.0.0.1 -P15306 -uroot -e 'SELECT 1' || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
restart: always
waitvitess:
image: mysql:8.0.40
links:
- vitess
depends_on:
vitess:
condition: service_healthy
entrypoint:
- bash
- -c
- 'until /usr/bin/mysql -hvitess -P15306 -uroot -e "SELECT 1"; do sleep 5; done'
volumes:
mysql_data:
driver_opts:
type: tmpfs
device: tmpfs