Closed landcraft closed 3 years ago
I've used another image, and that one works, so I guess I can close this.
I have the same problem here.
I am using Caddy server.
The docker-compose runs but shows only the (commands) help.
docker-compose.yml
in folder: goaccess
:
version: "3.8"
services:
goaccess:
image: allinurl/goaccess
container_name: goaccess
restart: unless-stopped
ports:
- 7890:7890
volumes:
- ./data:/goaccess
- ~/www/goaccess/index.html:/goaccess/index.html
- ~/docker/caddy/log/access.log:/goaccess/access.log:ro
in data/goaccess.conf
:
log-format CADDY
log-file /goaccess/access.log
output /goaccess/index.html
real-time-html true
create the file
sudo touch ~/www/goaccess/index.html
then start the container but only the help is shown.
If I run
cat~/docker/caddy/log/access.log | docker run --rm -i -e LANG=$LANG allinurl/goaccess -a -o html --log-format CADDY - > report.html
the report.html
is successfully being created.
Is something wrong with the paths?
Also I think that you must edit the page https://github.com/allinurl/goaccess/blob/master/DOCKER.md because it mentions that the docker container doesn't use subfolders /srv/{data,html,logs}
anymore. But some code examples there, already use /srv/{data,html,logs}
@landcraft what image did you use?
Get the other image I mentioned in my other comment
Get the other image I mentioned in my other comment
@landcraft I am sorry but I can not find any mention of an image.
Get the other image I mentioned in my other comment
@landcraft I am sorry but I can not find any mention of an image.
@landcraft Thank you but this is an old image. It still has version 1.4 of goaccess.
@allinurl Can you please take a look at my issue? Thank you.
You might consider opening another issue, as yours sounds quite different to mine...
@landcraft I have the same problem with you. When I run the docker image, it shows the help and exits.
@allinurl @landcraft @olonsoft I also see the same issue. Seems the current container is not working.
@allinurl Apologies. I should have been more clear, running as described in the readme works fine. Running it with a goacces.conf instead is not working as I would expect.
@samcro1967 sorry about that. you will need use volumes to inject the files. e.g.,
$ echo 'log-format VCOMBINED' > /home/user/goaccess.conf
$ sudo mkdir /srv
$ sudo cat access.log | docker run -v /home/user/goaccess.conf:/srv/goaccess.conf --rm -i -e LANG=$LANG allinurl/goaccess -a -o html -p /srv/goaccess.conf - > report.html
That seems to work. If I am understanding the intent of the container then, it is not to have is so that it can auto start, demonize, and continuously run. Just use something like cron to automate when using the container?
I've seen/heard folks using it both ways, and actually I'd say most of the time it's been daemonized and run in real-time. Here you can find a bit more regarding the original intent.
I didn't have much luck trying to get it working daemonized in the container, but it works fine with cron. Will circle back to this maybe this weekend. Would ultimately like it working in the container just if nothing else for easier migration/recovery to another machine in the future.
I'm trying to use your prebuilt docker image, but whenever I run it, it just shows help then stops. I also noticed that the init says
/bin/goaccess --help
Can you help?