forked from camilo/lhm
-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose-mysql-8.0.yml
63 lines (63 loc) · 1.54 KB
/
docker-compose-mysql-8.0.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
services:
# Writer
mysql-1:
container_name: mysql-1
image: percona:8.0
platform: linux/amd64
command:
--server-id=1
--log-bin
--log-slave-updates=ON
--gtid-mode=ON
--enforce-gtid-consistency=ON
--read-only=OFF
--max-connections=1000
--default-authentication-plugin=mysql_native_password
hostname: 'mysql-1'
volumes:
- ./scripts/mysql/writer:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_HOST: mysql-1
ports:
- "13006:3306"
# Reader
mysql-2:
container_name: mysql-2
image: percona:8.0
platform: linux/amd64
command:
--server-id=2
--log-bin
--log-slave-updates=ON
--gtid-mode=ON
--enforce-gtid-consistency=ON
--read-only=ON
--max-connections=1000
--default-authentication-plugin=mysql_native_password
hostname: 'mysql-2'
volumes:
- ./scripts/mysql/reader:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_HOST: mysql-2
ports:
- "13007:3306"
# Proxysql
proxysql:
container_name: proxysql
image: proxysql/proxysql:2.0.11
platform: linux/amd64
volumes:
- ./scripts/proxysql/proxysql.cnf:/etc/proxysql.cnf
command: "proxysql -c /etc/proxysql.cnf -f --idle-threads"
ports:
- "13005:3306"
- "6032:6032"
toxiproxy:
container_name: toxiproxy
image: "ghcr.io/shopify/toxiproxy"
ports:
- "8474:8474"
- "22220:22220"
- "22222:22222"