forked from mariadb-corporation/maxscale-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 1.38 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
version: '2'
services:
master:
image: mariadb:10.3
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'Y'
volumes:
- ./sql/master:/docker-entrypoint-initdb.d
command: mysqld --log-bin=mariadb-bin --binlog-format=ROW --server-id=3000 --log-slave-updates
ports:
- "4001:3306"
slave1:
image: mariadb:10.3
depends_on:
- master
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'Y'
volumes:
- ./sql/slave:/docker-entrypoint-initdb.d
command: mysqld --log-bin=mariadb-bin --binlog-format=ROW --server-id=3001 --log-slave-updates
ports:
- "4002:3306"
slave2:
image: mariadb:10.3
depends_on:
- master
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'Y'
volumes:
- ./sql/slave:/docker-entrypoint-initdb.d
command: mysqld --log-bin=mariadb-bin --binlog-format=ROW --server-id=3002 --log-slave-updates
ports:
- "4003:3306"
maxscale:
image: mariadb/maxscale:2.4
depends_on:
- master
- slave1
- slave2
volumes:
- ./maxscale.cnf.d:/etc/maxscale.cnf.d
ports:
- "4006:4006" # readwrite port
- "4008:4008" # readonly port
- "8989:8989" # REST API port