The InfluxDB2 docs have a “Getting started” for docker - great. However there is ZERO documentation (Even on the other ‘getting started’ editions) as to where data is stored. What volumes do I mount if I want the data to last though a restart?
I’ve guessed that some is in /root/.influxdbv2/ and… beyond that no idea.
Thanks for posting this docker-compose file, it was very helpful.
I am facing another issue, when I write data with GitHub - influxdata/influxdb-client-js: InfluxDB 2.0 JavaScript client and the following docker-compose file it doesn’t write any data, it times out. But when if I remove volume in docker-compose and write the data, it goes through, but obviously is wiped out as soon as I restart my docker.
Hi,
I also had a bit of hard time with this, it can be solved also without docker compose, I write here for other that may find it useful. Docker can pass flags to the executable so simply one needs to add the following flags: –bolt-path and –engine-path. An example below:
Here I mount 2 volumes, one for the bolt (where all the configs are) and one for the engine (where all the data are). Like this data and configs will survive a restart, separating it in two different volumes is not necessary, just my convenience.