Running PMM2 Server with docker compose

Hello,

I want to run PMM2 with docker.compose, and mounting the volumes to a specific location, in other hard drive (System disk is SSD)

How can I do it?

Where is creating the volume the initial command
docker create \ -v /srv \ --name pmm-data \ percona/pmm-server:2 /bin/true

Any one can help me?

UP! Any one can help me?

Hi,

I use this command when creating my docker instance :

sudo docker create -v /opt/prometheus/data -v /opt/consul-data -v /var/lib/mysql -v /var/lib/grafana --name pmm-data percona/pmm-server: /bin/true -g /pmm_server/docker

The -g flag on the end is where to place the data.

/dev/mapper/ssd-mysql_data 1.1T 489G 573G 47% /pmm_server

Hi Catoman , Maybe this is for PMM1?

From https://www.percona.com/doc/percona-…etting-up.html

$ docker create \
-v /opt/prometheus/data \
-v /opt/consul-data \
-v /var/lib/mysql \
-v /var/lib/grafana \
--name pmm-data \
percona/pmm-server:1 /bin/true

And for PMM2:

https://www.percona.com/doc/percona-…2.x/index.html


$ docker create \ -v /srv \ --name pmm-data \ percona/pmm-server:2 /bin/true

I’m running from docker-compose with this yml:



services:
pmm-data:
image: percona/pmm-server:2
container_name: pmm-data
command: "/bin/true -g /srv/pmm-data"
volumes:
- /srv/pmm-data:/srv

pmm-server:
image: percona/pmm-server:2
container_name: pmm-server
restart: always
ports:
- "80:80"
- "443:443"
depends_on:
- pmm-data
volumes_from:
- pmm-data


maybe can you hlep me?

Many thanks!