-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
183 lines (167 loc) · 4.73 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
version: "2.2"
services:
replicationmanager:
# image: signal18/replication-manager:2.1
image: replication-manager
build:
context: "https://github.com/erasys/replication-manager.git#slimmer_docker_image_2.1"
dockerfile: docker/Dockerfile
command: ["replication-manager", "monitor", "--config", "/etc/replication-manager/config/config.toml", "--verbose"]
volumes:
- ./replication-manager:/etc/replication-manager/config
ports:
- "10001:10001"
- "10005:10005"
depends_on:
- setup_a
- setup_b
maxscale:
image: asosso/maxscale
volumes:
- ./maxscale:/etc/maxscale.d
ports:
- "3306:3306"
- "3307:3307"
- "6603:6603"
depends_on:
- replicationmanager
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_ARBITRARY=1
ports:
- "8080:80"
setup_a:
image: mariadb
restart: "no"
entrypoint: ""
command: "/setup/setup.sh cluster_a foo.bar mariadb_a1 mariadb_a2 mariadb_a3 mariadb_a4 mariadb_wh"
volumes:
- ./setup:/setup
depends_on:
mariadb_a1: { condition: service_healthy }
mariadb_a2: { condition: service_healthy }
mariadb_a3: { condition: service_healthy }
mariadb_a4: { condition: service_healthy }
mariadb_wh: { condition: service_healthy }
setup_b:
image: mariadb
restart: "no"
entrypoint: ""
command: "/setup/setup.sh cluster_b bla.blub mariadb_b1 mariadb_b2 mariadb_b3 mariadb_b4 mariadb_wh"
volumes:
- ./setup:/setup
depends_on:
mariadb_b1: { condition: service_healthy }
mariadb_b2: { condition: service_healthy }
mariadb_b3: { condition: service_healthy }
mariadb_b4: { condition: service_healthy }
mariadb_wh: { condition: service_healthy }
mariadb_a1:
image: mariadb
command: ["mysqld", "--server-id=11", "--gtid-domain-id=10"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_a2:
image: mariadb
command: ["mysqld", "--server-id=12", "--gtid-domain-id=10"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_a3:
image: mariadb
command: ["mysqld", "--server-id=13", "--gtid-domain-id=10"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_a4:
image: mariadb
command: ["mysqld", "--server-id=14", "--gtid-domain-id=10"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_b1:
image: mariadb
command: ["mysqld", "--server-id=21", "--gtid-domain-id=20"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_b2:
image: mariadb
command: ["mysqld", "--server-id=22", "--gtid-domain-id=20"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_b3:
image: mariadb
command: ["mysqld", "--server-id=23", "--gtid-domain-id=20"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_b4:
image: mariadb
command: ["mysqld", "--server-id=24", "--gtid-domain-id=20"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10
mariadb_wh:
image: mariadb
command: ["mysqld", "--server-id=99", "--gtid-domain-id=99"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- ./mariadb:/etc/mysql/conf.d
healthcheck:
test: "mysqladmin -h 127.0.0.1 status || exit 1"
interval: "5s"
timeout: "1s"
retries: 10