Persistency of Grafana dashboards #13
Closed
allexjasper
started this conversation in
General
Replies: 1 comment
-
@allexjasper how do your restarted the docker container? The data will be persisted as long you not remove the container (see also grafana documentation), but you're right- I've added the host os mount for persistence- Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I had to do an adaption to get the Grafana dashboards being persisted after a restart of the container. To get that to work I had to expose the folder from the container to the host:
grafana:
image: grafana/grafana:9.5.2
container_name: grafana
#user: grafana
ports:
- 3000:3000
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PW}
volumes:
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- /var/lib/grafana:/var/lib/grafana
restart: unless-stopped
networks:
- mtig_network
As I don't have much background with Docker mapping host user to container usersI just gave full permissions to folter on the host machine. That made it work.
In addition I've also overwritten the Grafana default config (by copying the file out of the container and modifying) to allow anonymous access to the dashboards.
The 2 modification for that are highlieghted above. Maybe this helps anybody facing similar issues.
Thanks for creating this Docker stack. It works very well a simplief the setup significantly.
Best regards
Alex
Beta Was this translation helpful? Give feedback.
All reactions