Please, I have a little problem.
I would like to create a Web Service where I would build Grafana via Docker. The data would be stored on disk.
Grafana has two paths where the data is stored (“/var/lib/grafana” and “/etc/grafana”). The problem is that in “Web Service” I can only create one disk with only one path.
Could you please advise me how to mount both paths so that I don’t lose any data?
First up, you can only mount a single disk to a single path.
We’re using Graphana internally, and here’s the repo we’re deploying GitHub - johnbeynonorg/render-grafana which is only using a disk mounted at /var/lib/grafana
Looking at the file I have at \etc\grafana it shows:
srv-xxxxx:/etc/grafana$ cat grafana.ini | more
##################### Grafana Configuration Example #####################
#
# Everything has defaults so you only need to uncomment things you want to
# change
# possible values : production, development
;app_mode = production
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
;instance_name = ${HOSTNAME}
# force migration will run migrations that might cause dataloss
;force_migration = false
--More--
So we just using all the defaults.
However, should you want custom config, you could store the grafana.ini in your repo and then use COPY in the Dockerfile to copy it to the correct path as we do here