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

1 Like

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 [URL=“Percona Monitoring and Management”]https://www.percona.com/doc/percona-...etting-up.html[/URL]

$ 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:

[URL=“Percona Monitoring and Management”]https://www.percona.com/doc/percona-...2.x/index.html[/URL]


$ 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!

Hi @rpedrero This is what I use via docker-compose:

pmm-server:
    image: percona/pmm-server:2
    container_name: pmm-server
    restart: always
    networks:
      - npm_proxy
    environment:
      - DISABLE_TELEMETRY=0
      - ENABLE_DBAAS=1
      - ENABLE_BACKUP_MANAGEMENT=1
      - ENABLE_ALERTING=1
      - GF_ANALYTICS_CHECK_FOR_UPDATES=false
      - GF_AUTH_LOGIN_COOKIE_NAME=pmm_session
      - GF_AUTH_ANONYMOUS=true
      - GF_SECURITY_DISABLE_GRAVATAR=true
      - GF_SERVER_DOMAIN="pmm.XXX.XXX"
    volumes:
      - pmm-data:/srv
    ports:
      - '192.168.0.10:80:80'
      - '192.168.0.10:443:443'
    labels:
      - 'traefik.enable=false'
      - 'traefik.http.routers.pmm.rule=Host(`pmm.XXX.XXX`)'
      - 'traefik.http.routers.pmm.entrypoints=websecure'
      - 'traefik.http.routers.pmm.tls.certresolver=le'

volumes:
  pmm-data:
    name: pmm-data
    external: false
1 Like