forked from percona/pmm-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
106 lines (97 loc) · 3.2 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
---
version: '3.7'
services:
pmm-server:
image: ${PMM_SERVER_IMAGE:-perconalab/pmm-server:dev-latest}
container_name: pmm-agent_pmm-server
ports:
- 127.0.0.1:80:80
- 127.0.0.1:443:443
environment:
- PMM_DEBUG=1
- PERCONA_TEST_CHECKS_INTERVAL=10s
# for local development
- PERCONA_TEST_CHECKS_FILE=/srv/checks/custom-checks.yml
# for check-dev
# - PERCONA_TEST_SAAS_HOST=check-dev.percona.com:443
# - PERCONA_TEST_CHECKS_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
volumes:
- ./testdata/checks:/srv/checks
test_db:
image: aleksi/test_db:1.1.0
container_name: pmm-agent_test_db
volumes:
- test_db_mysql:/test_db/mysql/world:ro
- test_db_postgres:/test_db/postgresql/world:ro
# It is essential to have an extra directory `/slowlogs/` between host and container;
# and to not have a trailing slash at `./testdata/mysql`.
# Otherwise, MySQL in Docker for Mac completely locks during/after slowlog rotation tests.
mysql:
image: ${MYSQL_IMAGE:-percona:5.7}
container_name: pmm-agent_mysql
command: >
--sql-mode="ANSI_QUOTES"
--performance-schema --innodb_monitor_enable=all
--slow_query_log --slow_query_log_file=/mysql/slowlogs/slow.log --long_query_time=0
ports:
- 127.0.0.1:3306:3306
environment:
- MYSQL_ROOT_PASSWORD=root-password
- MYSQL_USER=pmm-agent
- MYSQL_PASSWORD=pmm-agent-password
- UMASK=0777 # for slowlog file
volumes:
- test_db_mysql:/docker-entrypoint-initdb.d/:ro
- ./testdata/mysql:/mysql
mongo:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:4.2}
container_name: pmm-agent_mongo
command: --profile 2
ports:
- 127.0.0.1:27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root-password
mongo_with_ssl:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:4.2}
ports:
- 127.0.0.1:27018:27017
command:
- --profile=2
- --sslMode=requireSSL
- --sslPEMKeyFile=/etc/ssl/certificates/server.pem
- --sslCAFile=/etc/ssl/certificates/ca.crt
- --sslWeakCertificateValidation
- --bind_ip=0.0.0.0
volumes:
- ${PWD}/utils/tests/testdata/mongodb:/etc/ssl/certificates
mongonoauth:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:4.2}
container_name: pmm-agent_mongonoauth
command: --profile 2
ports:
- 127.0.0.1:27019:27017
postgres:
image: ${POSTGRES_IMAGE:-postgres:11}
container_name: pmm-agent_postgres
command: >
-c shared_preload_libraries='${PG_PRELOADED_LIBS:-pg_stat_statements}'
-c track_activity_query_size=2048
-c pg_stat_statements.max=10000
-c pg_stat_monitor.pgsm_query_max_len=10000
-c pg_stat_statements.track=all
-c pg_stat_statements.save=off
-c track_io_timing=on
ports:
- 127.0.0.1:5432:5432
environment:
- POSTGRES_USER=pmm-agent
- POSTGRES_PASSWORD=pmm-agent-password
volumes:
- test_db_postgres:/docker-entrypoint-initdb.d/
sysbench:
image: perconalab/sysbench
container_name: pmm-agent_sysbench
volumes:
test_db_mysql:
test_db_postgres: