matomo-org/docker

Official docker image failing

krystalcode opened this issue · 9 comments

Official image fails, the libs folder does not exist and the upgrade.php script is not available. That was trying with matomo:3.9.1-fpm-alpine. It worked after forking this repository and creating an automated build, see https://hub.docker.com/r/krystalcode/matomo

The build works, the issue comes up when trying to run the application using the built image.

I believe I was using this image: https://hub.docker.com/_/matomo, the fpm-alpine tag. It's not automaically built by Docker Hub builds so I'm not sure where it is beng built or if it is provided by Docker and it's a different image than this repo.

getting crazy for 3 days now, until i see this post. the docker-compose.yml example uses the fpm image that was not working for me and didnt give any error. now everything works well
thanks 👯‍♂️

J0WI commented

What exactly is not working for you? You can find the latest fpm-alpine tags here.

Same here, I just have the logs :
app_1 | [24-Apr-2020 13:39:46] NOTICE: fpm is running, pid 1
app_1 | [24-Apr-2020 13:39:46] NOTICE: ready to handle connections

Port 9000 is not responding, from private ip of the container. I'm using _/matomo:fpm-alpine at version 3.13.4.

The volume was initially empty, am I doing something wrong ?

J0WI commented

Have you publish port 9000? How do you access the service?

The port is exposed, in docker-compose.yml, and app is on the same network as nginx.
To test it, I inspected the container, to get it's private ip, and tried from the host :

curl http://APP_CONTAINER_IP:9000/

but get no response at all.

I finally figured, in the container, there is no php.ini by default, so I mount a local file php.ini with listen = 9000 directive to /usr/local/etc/php/php.ini. Then the app is starting.

J0WI commented

curl http://APP_CONTAINER_IP:9000/

The FPM variant is a FastCGI service and doesn't speak HTTP. You could use cgi-fcgi as a client or combine it with a web server like nginx: https://github.com/matomo-org/docker/blob/master/.examples/nginx/docker-compose.yml
The provided example works out of the box for me (you just need to provide some database credentials). You may want to publish port 9000 if you want to access the service directly. Using the Docker internal IP may cause routing problems.