-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.yml
58 lines (57 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
49
50
51
52
53
54
55
56
57
58
#
# This is an example file for docker-compose
#
version: '3'
services:
mysql-1:
image: "mattalord/innodb-cluster"
restart: always
hostname: mysql-1
environment:
- "MYSQL_ROOT_PASSWORD=root"
- "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
- "BOOTSTRAP=1"
volumes:
- ./data/mysql-1:/var/lib/mysql
mysql-2:
image: "mattalord/innodb-cluster"
restart: always
hostname: mysql-2
environment:
- "MYSQL_ROOT_PASSWORD=root"
- "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
- "GROUP_SEEDS=mysql-1:6606,mysql-3:6606"
volumes:
- ./data/mysql-2:/var/lib/mysql
depends_on:
- mysql-1
mysql-3:
image: "mattalord/innodb-cluster"
restart: always
hostname: mysql-3
environment:
- "MYSQL_ROOT_PASSWORD=root"
- "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
- "GROUP_SEEDS=mysql-1:6606,mysql-2:6606"
volumes:
- ./data/mysql-3:/var/lib/mysql
depends_on:
- mysql-1
router:
image: "mattalord/innodb-cluster"
restart: always
hostname: router
ports:
- "3306:3306"
- "6606:6606"
- "6446-6447:6446-6447"
volumes:
- ./data/mysql-router:/var/lib/mysqlrouter
depends_on:
- mysql-1
- mysql-2
- mysql-3
environment:
- "NODE_TYPE=router"
- "MYSQL_ROOT_PASSWORD=root"
- "MYSQL_HOST=mysql-1"