create a new volume for the proxy logs, mounted as /logs
change nginx log location to use the volume
change log format to the standard "combined" format rather than a customer one (to make parsing much easier).
install the goaccess package (+ other useful tools)
setup two new nginx endpoints, one to server the static html of goaccess, and another to handle its websocket for live updates.
minor tweaks to nginx config (whitespace, automatically pick number of workers based on number of cpus).
Note: these logging changes mean nginx will no longer log to stdout, which means docker log will not show the logs. This isn't actually a big problem, as docker logs on kept 10M of logs anyhow. This now matches what the webserver container does too.
Testing: tested locally. Also tested in prod by checking out this branch and updating the reverse_proxy container. At the moment you can see the results here: https://ropewiki.com/report.html
/logs
goaccess
package (+ other useful tools)goaccess
, and another to handle its websocket for live updates.Note: these logging changes mean nginx will no longer log to stdout, which means
docker log
will not show the logs. This isn't actually a big problem, asdocker logs
on kept 10M of logs anyhow. This now matches what the webserver container does too.Testing: tested locally. Also tested in prod by checking out this branch and updating the reverse_proxy container. At the moment you can see the results here: https://ropewiki.com/report.html