-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
116 lines (110 loc) · 2.71 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
version: '3.4'
services:
mysqlmaster:
hostname: mysqlmaster
image: garutilorenzo/mysql-gtid-replication:latest
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
- ./grants/:/docker-entrypoint-initdb.d/
- ./config/master.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
- type: volume
source: mysqlmaster
target: /var/lib/mysql
volume:
nocopy: true
networks:
cluster:
ipv4_address: 172.56.0.2
mysqlslave:
hostname: mysqlslave
image: garutilorenzo/mysql-gtid-replication:latest
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_MASTER_HOST: mysqlmaster
MYSQL_MASTER_USER: root
MYSQL_MASTER_PASSWORD: password
MYSQL_REPLICATION_USER: repl
MYSQL_REPLICATION_PASSWORD: repl
volumes:
- ./config/replica.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
- type: volume
source: mysqlslave
target: /var/lib/mysql
volume:
nocopy: true
networks:
cluster:
ipv4_address: 172.56.0.3
proxysql:
hostname: proxysql
image: severalnines/proxysql:latest
ports:
- 3306:3306
- 3307:3307
- 3308:3308
- 6032:6032
volumes:
- ./config/proxysql.cnf:/etc/proxysql.cnf
- type: volume
source: proxysql
target: /var/lib/proxysql
volume:
nocopy: true
command: ['proxysql', '-f', '--reload', '-c', '/etc/proxysql.cnf']
networks:
cluster:
ipv4_address: 172.56.0.4
depends_on:
- mysqlmaster
- mysqlslave
heartbeat:
hostname: heartbeat
image: garutilorenzo/heartbeat:latest
networks:
cluster:
ipv4_address: 172.56.0.5
depends_on:
- proxysql
- mysqlmaster
- mysqlslave
environment:
PT_MASTER: proxysql
PT_DATABASE: percona
PT_USER: super
PT_PASSWORD: superLuser
orchestrator:
hostname: orchestrator
image: openarkcode/orchestrator:latest
command:
- /bin/bash
- -c
- |
sleep 60
/usr/local/orchestrator/orchestrator -c clusters
/usr/local/orchestrator/orchestrator -c discover -i mysqlmaster:3306
/usr/local/orchestrator/orchestrator -c discover -i mysqlslave:3306
/usr/local/orchestrator/orchestrator http
volumes:
- ./config/orchestrator.conf.json:/etc/orchestrator.conf.json
- type: volume
source: orchestrator
target: /app/data
volume:
nocopy: true
networks:
cluster:
ipv4_address: 172.56.0.7
ports:
- "3000:3000"
volumes:
mysqlmaster:
mysqlslave:
proxysql:
orchestrator:
networks:
cluster:
ipam:
driver: default
config:
- subnet: 172.56.0.0/16