Reputation: 2177
I have been working on sample project with Windows+Docker+Prometheus+Grafana Issue: Loosing all details on grafana dashboard on docker or, container restart. All works fine with docker-compose for the first time. I have the created the volumes. The application, prometheus &, grafana containers are running under same network, the issue occurs on docker restart or, container restart &, grafana also asks me to change the password, I hope this has something related to volume.
docker-compose entry for grafana:
grafana:
image: grafana/grafana
container_name: gradle_docker-grafana
ports:
- "3000:3000"
volumes:
- grafana-storage:/var/lib/grafana
networks:
- gradle_docker_net
depends_on:
- prometheus
volumes:
prometheus-storage: {}
grafana-storage: {}
mongo-storage: {}
sonarqube_conf: {}
sonarqube_data: {}
Any suggestions would be helpful as I am unable to find anything related to the same.
Upvotes: 3
Views: 2844
Reputation: 2176
Did you define the grafana-storage
volume in your top-level volumes
section? If not then I'd try that and see whether it solves the problem.
https://docs.docker.com/compose/compose-file/#volumes
Upvotes: 1