GregYankovoy / docker-goaccess

goaccess reverse proxied through nginx for ease of use
MIT License
32 stars 14 forks source link

Persist data on docker-volume #12

Open copolycube opened 3 years ago

copolycube commented 3 years ago

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

GregYankovoy commented 3 years ago

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.

copolycube commented 2 years ago

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

copolycube commented 2 years ago

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