xavier-hernandez / goaccess-for-nginxproxymanager

GoAccess Docker Image for Nginx Proxy Manager and more...
https://hub.docker.com/r/xavierh/goaccess-for-nginxproxymanager
MIT License
523 stars 39 forks source link

Additional options for goaccess using environment variables #167

Closed pucherot closed 10 months ago

pucherot commented 10 months ago

I suggest defining 3 environment variables so you can pass additional options to goaccess via command line.

# goaccess command line options
ENV HTML_REFRESH=5
ENV KEEP_LAST=30
ENV GOACCESS_OTHER_OPTIONS=" "

HTML_REFRESH define refresh period in second of HTML. I think 5 seconds is enough. CPU usage is greatly reduced KEEP_LAST define the number of days the report shows. GOACCESS_OTHER_OPTIONS define any other additional options that you want pass to goaccess. see https://goaccess.io/man#options for more info.

I also fix a small bug in script resources/scripts/logs/npm_error.sh that mistakenly includes all the code twice (probably copy&paste problem).

xavier-hernandez commented 10 months ago

I added a version of this to v1.1.23. Except for the multiple options, I think adding that would cause large support issues for me since I cannot test all the options.