Add basic docker-compose setup
The setup contains a three node master-slave cluster with both readwritesplit and readconnroute. Removed the duplication of the configuration files in the README and provided links instead.
This commit is contained in:
34
docker/docker-compose.yml
Normal file
34
docker/docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
version: '2'
|
||||
services:
|
||||
master:
|
||||
image: mariadb:10.2
|
||||
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
|
||||
|
||||
slave1:
|
||||
image: mariadb:10.2
|
||||
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
|
||||
|
||||
slave2:
|
||||
image: mariadb:10.2
|
||||
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
|
||||
|
||||
maxscale:
|
||||
build: .
|
||||
container_name: maxscale
|
||||
volumes:
|
||||
- ./maxscale.cnf.d:/etc/maxscale.cnf.d
|
||||
ports:
|
||||
- "4006:4006"
|
||||
- "4008:4008"
|
Reference in New Issue
Block a user