-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-more-replica.yml
More file actions
111 lines (105 loc) · 2.37 KB
/
docker-compose-more-replica.yml
File metadata and controls
111 lines (105 loc) · 2.37 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
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
104
105
106
107
108
109
110
111
---
version: "2"
services:
mysql_master:
image: mysql:8.0
container_name: mysql-master
volumes:
- mysql-master-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/master/data",
"--log-bin=bin.log",
"--server-id=1"
]
environment:
&mysql-default-environment
MYSQL_ROOT_PASSWORD: toor
MYSQL_DATABASE: test
MYSQL_USER: test_user
MYSQL_PASSWORD: insecure
ports:
- "3308:3306"
mysql_slave_1:
image: mysql:8.0
container_name: mysql-slave-1
volumes:
- mysql-replica1-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/slave/data",
"--log-bin=bin.log",
"--server-id=2"
]
environment: *mysql-default-environment
ports:
- "3309:3306"
mysql_slave_2:
image: mysql:8.0
container_name: mysql-slave-2
volumes:
- mysql-replica2-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/slave/data",
"--log-bin=bin.log",
"--server-id=3"
]
environment: *mysql-default-environment
ports:
- "3310:3306"
mysql_slave_3:
image: mysql:8.0
container_name: mysql-slave-3
volumes:
- mysql-replica3-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/slave/data",
"--log-bin=bin.log",
"--server-id=4"
]
environment: *mysql-default-environment
ports:
- "3311:3306"
mysql_slave_4:
image: mysql:8.0
container_name: mysql-slave-4
volumes:
- mysql-replica4-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/slave/data",
"--log-bin=bin.log",
"--server-id=5"
]
environment: *mysql-default-environment
ports:
- "3312:3306"
mysql_slave_5:
image: mysql:8.0
container_name: mysql-slave-5
volumes:
- mysql-replica5-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/slave/data",
"--log-bin=bin.log",
"--server-id=6"
]
environment: *mysql-default-environment
ports:
- "3313:3306"
volumes:
mysql-master-volume:
mysql-replica1-volume:
mysql-replica2-volume:
mysql-replica3-volume:
mysql-replica4-volume:
mysql-replica5-volume: