docker-goaccess icon indicating copy to clipboard operation
docker-goaccess copied to clipboard

Persist data on docker-volume

Open copolycube opened this issue 4 years ago • 3 comments

Hello @GregYankovoy , I am using your bundle of goaccess and it was a great way to start using this cool project, thanks a lot !

As suggested in the https://github.com/GregYankovoy/docker-goaccess/pull/11 I am using it in docker-compose.

I was wondering how it would be possible to add a docker named volume so that we keep persist the data when restarting, and how that would integrate with your bundle ?

Thanks in advance for your help

copolycube avatar Jun 24 '21 16:06 copolycube

Hi @copolycube . This has come up before and I believe goaccess has some built in features for storage persistence. Last time this came up, there was no solution available: https://github.com/GregYankovoy/docker-goaccess/issues/2

However, reading through the nested goaccess issue thread again, looks like 1.4 may have created some less complex disk persistence: https://github.com/allinurl/goaccess/issues/708

A quick google search returns this informative article: https://arnaudr.io/2020/08/10/goaccess-14-a-detailed-tutorial/

Seems like --persist and --restore may be helpful for the use case you are describing. Are you able to do any testing with those flags within the container? If we can verify these give us the desired behavior, I can add persistence as an optional environment variable on the container.

GregYankovoy avatar Jul 02 '21 00:07 GregYankovoy

Hello @GregYankovoy , I'm not sure how I could test this with your image :-/

copolycube avatar Aug 03 '21 21:08 copolycube

Hello @GregYankovoy I submitted the https://github.com/GregYankovoy/docker-goaccess/pull/16 that contains this feature (among others).

copolycube avatar Oct 06 '21 19:10 copolycube