GregYankovoy / docker-goaccess

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

NGINX: Keep docker logs AND goaccess #10

Closed iot-resister closed 3 years ago

iot-resister commented 3 years ago

Great image! I've tried various things and this seems the most simple but also most hackish. I'm trying to keep my docker logs AND have it read by goaccess. The best solution is something like this on a cron job.

 cat $(docker inspect --format='{{.LogPath}}' test) | jq -r '.log|tostring'  >>  ~/goaccess/test/access.log 

Then your image can read -v "~/goaccess/test:/opt/log"

Please advise