-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
76 lines (70 loc) · 1.88 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
version: "2"
services:
mysql-m1:
build: ./docker/db
volumes:
- /var/lib/mysql
command: --server-id=1
--log-bin=mysql-bin
--binlog-format=ROW
--sync-binlog=1
--log-slave-updates=ON
--gtid-mode=ON
--enforce-gtid-consistency=ON
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
ports:
- "21001:3306" # master
mysql-s1:
build: ./docker/db
volumes:
- /var/lib/mysql
command: --server-id=2
--log-bin=mysql-bin
--binlog-format=ROW
--sync-binlog=1
--log-slave-updates=ON
--gtid-mode=ON
--enforce-gtid-consistency=ON
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
toxiproxy:
image: shopify/toxiproxy
ports:
- "22001:22001" # master
- "22002:22002" # slave
- "28474:8474"
prometheus:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
mysqld_exporter-m1:
image: prom/mysqld-exporter
command: ["-collect.heartbeat=true", "-collect.heartbeat.database=meta", "-collect.heartbeat.table=heartbeat"]
ports:
- "9104:9104"
environment:
DATA_SOURCE_NAME: "root:@(astrogoat_mysql-m1_1:3306)/"
mysqld_exporter-s1:
image: prom/mysqld-exporter
command: ["-collect.heartbeat=true", "-collect.heartbeat.database=meta", "-collect.heartbeat.table=heartbeat"]
ports:
- "9105:9104"
environment:
DATA_SOURCE_NAME: "root:@(astrogoat_mysql-s1_1:3306)/"
grafana:
image: grafana/grafana:3.0.0-beta7
environment:
- GF_SECURITY_ADMIN_PASSWORD=pass
volumes:
- ./grafana.db:/var/lib/grafana/grafana.db
depends_on:
- prometheus
ports:
- "3000:3000"