-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathdocker-compose.yml
100 lines (95 loc) · 3.39 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
version: '3.5'
services:
node1:
image: mysql/mysql-server:8.0
container_name: node1
hostname: node1
ports:
- "3307:3306"
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=mypass
command: ["mysqld",
"--server-id=1",
"--log-bin=mysql-bin-1.log",
"--enforce-gtid-consistency=ON",
"--log-slave-updates=ON",
"--gtid-mode=ON",
"--transaction-write-set-extraction=XXHASH64",
"--binlog-checksum=NONE",
"--master-info-repository=TABLE",
"--relay-log-info-repository=TABLE",
"--plugin-load=group_replication.so",
"--relay-log-recovery=ON",
"--loose-group-replication-start-on-boot=OFF",
"--loose-group-replication-group-name=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"--loose-group-replication-local-address=node1:6606",
"--loose-group-replication-group-seeds=node1:6606,node2:6606,node3:6606",
"--loose-group-replication-single-primary-mode=ON",
"--loose-group-replication-enforce-update-everywhere-checks=OFF"]
healthcheck:
test: "mysqladmin ping -u root -p$${MYSQL_ROOT_PASSWORD}"
interval: 2s
retries: 20
node2:
image: mysql/mysql-server:8.0
container_name: node2
hostname: node2
ports:
- "3308:3306"
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=mypass
command: ["mysqld",
"--server-id=1",
"--log-bin=mysql-bin-1.log",
"--enforce-gtid-consistency=ON",
"--log-slave-updates=ON",
"--gtid-mode=ON",
"--transaction-write-set-extraction=XXHASH64",
"--binlog-checksum=NONE",
"--master-info-repository=TABLE",
"--relay-log-info-repository=TABLE",
"--plugin-load=group_replication.so",
"--relay-log-recovery=ON",
"--loose-group-replication-start-on-boot=OFF",
"--loose-group-replication-group-name=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"--loose-group-replication-local-address=node2:6606",
"--loose-group-replication-group-seeds=node1:6606,node2:6606,node3:6606",
"--loose-group-replication-single-primary-mode=ON",
"--loose-group-replication-enforce-update-everywhere-checks=OFF"]
healthcheck:
test: "mysqladmin ping -u root -p$${MYSQL_ROOT_PASSWORD}"
interval: 2s
retries: 20
node3:
image: mysql/mysql-server:8.0
container_name: node3
hostname: node3
ports:
- "3309:3306"
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=mypass
command: ["mysqld",
"--server-id=1",
"--log-bin=mysql-bin-1.log",
"--enforce-gtid-consistency=ON",
"--log-slave-updates=ON",
"--gtid-mode=ON",
"--transaction-write-set-extraction=XXHASH64",
"--binlog-checksum=NONE",
"--master-info-repository=TABLE",
"--relay-log-info-repository=TABLE",
"--plugin-load=group_replication.so",
"--relay-log-recovery=ON",
"--loose-group-replication-start-on-boot=OFF",
"--loose-group-replication-group-name=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"--loose-group-replication-local-address=node3:6606",
"--loose-group-replication-group-seeds=node1:6606,node2:6606,node3:6606",
"--loose-group-replication-single-primary-mode=ON",
"--loose-group-replication-enforce-update-everywhere-checks=OFF"]
healthcheck:
test: "mysqladmin ping -u root -p$${MYSQL_ROOT_PASSWORD}"
interval: 2s
retries: 20