DockSTARTer icon indicating copy to clipboard operation
DockSTARTer copied to clipboard

[BUG] prometheus app doesn't persist data

Open giannoug opened this issue 6 months ago • 0 comments

Bug report

Describe the bug The prometheus application doesn't seem to persist data. When the container is removed, all data is lost. Also, the configuration isn't mounted from the host making it unable to be configured.

To Reproduce Steps to reproduce the behavior:

  1. Install prometheus, let it collect some data from itself (it's configured that way by default)
  2. ds -c down prometheus
  3. 'ds -c up prometheus`

Expected behavior Data should be persisted across container lifecycles.

Additional context

Can be easily fixed with an override:

services:
  prometheus:
    volumes:
      - ${DOCKERCONFDIR}/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml
      - ${DOCKERCONFDIR}/prometheus/data:/prometheus

The /prometheus folder needs appropriate permissions, else the container fails to start:

chown -R $USER:$USER ~/.config/appdata/prometheus/data # This might not be needed
chmod -R o+rw ~/.config/appdata/prometheus/data

giannoug avatar Aug 20 '24 16:08 giannoug