DockSTARTer
DockSTARTer copied to clipboard
[BUG] prometheus app doesn't persist data
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:
- Install prometheus, let it collect some data from itself (it's configured that way by default)
-
ds -c down prometheus
- '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