-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 913 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (41 loc) · 913 Bytes
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
---
version: "2"
services:
mysql_master:
image: mysql:8.0
container_name: mysql-master
volumes:
- mysql-master-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/master/data",
"--log-bin=bin.log",
"--server-id=1"
]
environment:
&mysql-default-environment
MYSQL_ROOT_PASSWORD: toor
MYSQL_DATABASE: test
MYSQL_USER: test_user
MYSQL_PASSWORD: insecure
ports:
- "3308:3306"
mysql_slave_1:
image: mysql:8.0
container_name: mysql-slave-1
volumes:
- mysql-replica1-volume:/tmp
command:
[
"mysqld",
"--datadir=/tmp/slave/data1",
"--log-bin=bin.log",
"--server-id=2"
]
environment: *mysql-default-environment
ports:
- "3309:3306"
volumes:
mysql-master-volume:
mysql-replica1-volume: