-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose-ubuntu.yml
41 lines (37 loc) · 1.33 KB
/
docker-compose-ubuntu.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
---
version: "3"
services:
pmm-server-ubuntu:
container_name: pmm-server-ubuntu
image: ${PMM_SERVER_IMAGE:-perconalab/pmm-server:dev-latest}
ports:
- 8445:443
restart: always
pmm-client-ubuntu:
container_name: pmm-client-ubuntu
image: ubuntu
depends_on:
- pmm-server-ubuntu
- postgres-ubuntu
command: >
bash -c "
apt-get update
apt-get install -y lsb-release
apt-get install wget curl gnupg2 -y
wget https://repo.percona.com/apt/percona-release_latest.jammy_all.deb
dpkg -i percona-release_latest.jammy_all.deb
percona-release enable-only original experimental
apt-get update
apt-get install pmm2-client -y
pmm-agent setup --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml --server-address=pmm-server-ubuntu:443 --server-insecure-tls --server-username=admin --server-password=admin
nohup pmm-agent --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml &
sleep 10
pmm-admin add postgresql --username=postgres --password=postgres --agent-password=agentpass postgres-ubuntu postgres-ubuntu:5432
tail -f /dev/null
"
postgres-ubuntu:
image: postgres
container_name: postgres-ubuntu
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres