fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
123 stars 17 forks source link

docker-compose, mount live sqlite #100

Closed Corfucinas closed 1 year ago

Corfucinas commented 1 year ago

I understand this is more a question than a bug (no question template). Also, I'm aware that it is more of a docker aspect than this plugin, but since you have experience while developing I would like to ask you.

Is it possible to mount a .sqlite db from the host that is read live on the docker container?

for example

./database.sqlite/home/database.sqlite

This will work, however, the database in the container will only display data at the time of deployment.

How is it possible to make sure the data matches the live database form the host?

fr-ser commented 1 year ago

You can mount the database as a docker volume. I did find some issues with the data not always updating, though.

Corfucinas commented 1 year ago

@fr-ser

I opened a question in Stackoverflow which I ended answering myself after some investigation.

Here's the link

https://stackoverflow.com/questions/74148603/docker-compose-mount-live-database-from-host-live-sync?noredirect=1#comment130929787_74148603

If anyone runs into this question, please refer to the thread in the link above for an explanation