forked from percona/pmm-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (56 loc) · 1.8 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
---
version: '3'
services:
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
postgres:
image: ${POSTGRES_IMAGE:-postgres:11}
container_name: pmm-agent_postgres
command: >
-c shared_preload_libraries=pg_stat_statements
-c pg_stat_statements.max=10000
-c pg_stat_statements.track=all
-c pg_stat_statements.save=off
ports:
- 127.0.0.1:15432:5432
environment:
- POSTGRES_USER=pmm-agent
- POSTGRES_PASSWORD=pmm-agent-password
volumes:
- test_db_postgres:/docker-entrypoint-initdb.d/
volumes:
test_db_mysql:
test_db_postgres: