@pir1981 opened this Issue on October 18th 2017

I have
piwik:3.2.0-fpm (https://github.com/piwik/docker-piwik)

I don't seem to be able to get config.ini.php up and running for a clean Piwik install. I have dropped it in the /var/www/html/config with following contents

  • none at all
  • an exact copy of global.ini.php
  • just (which is the only thing I want)
log_writers[] = file

always resulting in a not working piwik instance, stating there has been an error. From my nginx error.log

2017/10/18 15:57:43 [error] 7<a href='/7'>#7</a>: *41 FastCGI sent in stderr: "PHP message: Error in Piwik: Cannot connect to the database: SQLSTATE[HY000] [2002] No such file or directory This may be a temporary issue, try refreshing the page. If the problem persists please contact your Piwik administrator" while reading response header from upstream, client:, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://", host: "something.dev"

If I remove the config.ini.php again, everything is just fine and I get the Piwik welcome page.
What am I doing wrong? I have the log folder for the log file, I even have created the log file with www-data rights... but just can't figure it out. Thanks

@pir1981 commented on October 18th 2017

ok, I found it out. It was not clear to me, that I have to run through the whole browser setup process first, and that creates a config.ini.php itself. I tried having config.ini.php just without the host/db set and it seems that once you have that file, it is assumed that you went through the init process. If you don't have it, the init process is just started. I didn't find that in any FAQ, so might be worth adding it.

@mattab commented on October 18th 2017 Member

@pir1981 Which FAQ do you think we should add this information into? thanks

@ydarias commented on January 14th 2019

So, do you know any solution to deploy Matomo using Docker with a DB that uses SSL? (e.g: a DB hosted by Compose)

The official instructions, as @pir1981 said, indicate that the setup must be done against the DB without SSL and later configure it in the config.ini.php file. But using Docker that doesn't sound too good from the maintainability point of view and some DB providers like Compose doesn't allow not SSL connections.

Thank you.

This Issue was closed on October 18th 2017
Powered by GitHub Issue Mirror