-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (48 loc) · 1.25 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
version: '3.1'
services:
master:
image: mysql:5.6
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
container_name: mysql_master
volumes:
- ./initdb/users.sql:/docker-entrypoint-initdb.d/users.sql
- ./initdb/create_replication_user.sql:/docker-entrypoint-initdb.d/create_replication_user.sql
- ./conf/binlog.cnf:/etc/mysql/mysql.conf.d/binlog.cnf
ports:
- 3306:3306
env_file:
- .env
networks:
- main
slave:
image: mysql:5.6
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
depends_on:
- master
container_name: mysql_slave
volumes:
- ./initdb/users.sql:/docker-entrypoint-initdb.d/users.sql
- ./initdb/enable_replication.sql:/docker-entrypoint-initdb.d/enable_replication.sql
- ./conf/slave.cnf:/etc/mysql/mysql.conf.d/slave.cnf
ports:
- 3307:3306
env_file:
- .env
networks:
- main
proxysql:
image: severalnines/proxysql:2.0
restart: unless-stopped
container_name: proxysql
volumes:
- ./conf/proxysql.cnf:/etc/proxysql.cnf
ports:
- 6033:6033
- 6032:6032
- 6080:6080
networks:
- main
networks:
main: