This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-mysql.yaml
76 lines (73 loc) · 1.81 KB
/
docker-compose-mysql.yaml
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: '3'
services:
agent:
links:
- mysql
image: datadog/agent:7.35.0
environment:
- DD_API_KEY=${DD_API_KEY}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc/:/host/proc/:ro
- /sys/fs/cgroup:/host/sys/fs/cgroup:ro
sysbench:
links:
- mysql
build: docker/sysbench
command:
- /bin/loop-forever.sh
- sleep 2
- '&&'
- /usr/local/bin/sysbench
- oltp_read_write
- prepare
- --db-ps-mode=disable
- --db-driver=mysql
- --table-size=100000
- --tables=10
- --create-secondary=1
- --threads=1
- --mysql-host=mysql
- --mysql-port=3306
- --mysql-user=sbtest
- --mysql-password=sbtestpw
- --mysql-db=sbtest
- '||'
- /usr/local/bin/sysbench
- oltp_read_write
- run
- --db-ps-mode=disable
- --db-driver=mysql
- --report-interval=10
- --table-size=100000
- --tables=10
- --create-secondary=1
- --threads=4
- --rate=50
- --time=360
- --mysql-host=mysql
- --mysql-port=3306
- --mysql-user=sbtest
- --mysql-password=sbtestpw
- --mysql-db=sbtest
mysql:
image: mysql:5.7
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=1
ports:
- "3306"
volumes:
- ./mysql/mysql.conf:/etc/mysql.conf
- ./mysql/initdb/1_mysql-5_x.sql:/docker-entrypoint-initdb.d/1_mysql-5_x.sql
- ./mysql/initdb/2_mysql-dbm-setup.sql:/docker-entrypoint-initdb.d/2_mysql-dbm-setup.sql
labels:
com.datadoghq.ad.check_names: '["mysql"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: |
[{
"dbm": true,
"server": "%%host%%",
"user": "datadog",
"pass": "dog",
"port": "3306"
}]