default email configuration with env var
@tianon I need your feedback on that.
in response to https://github.com/indiehosters/piwik/issues/10, I plan to add this configuration in the entrypoint.sh.
I think it would benefit to all the image users so I'll do it in this repo (and not on another Dockerfile, using FROM field).
Email is important feature for piwik (user management, reports...).
If you don't veto, then I'll do it.
As long as it's still flexible, I'm not opposed!
By flexible, I mean allowing users to supply their own ssmtp.conf which doesn't get overwritten if they don't supply any environment variables, and ensure that the file is written to such that it doesn't get duplicated (ie, if you're going to re-write the file in entrypoint.sh, it should be re-written completely or modified in-place, not appended to, and only if envs are actually supplied). :+1:
Ok, closing this, actually, piwik as a way to configure smtp.
related to https://github.com/piwik/docker-piwik/commit/b511e57a17ab57d9f2e947fc391f004990d7f1d3
I don't get it, so how to configure it via ENV vars?
The real issue is here: https://github.com/piwik/piwik/issues/10914
Here is the config: https://github.com/piwik/piwik/blob/master/config/global.ini.php#L735-L743
But most legacy FLOSS don't read env vars to config...
In docker world, we workaround that with hacky entrypoint bash scripts: giltab example wordpress example
@vanthome if you like devloping such a script for piwik, feel free, it would be amazing :) @tianon is there a general pattern that is emerging to have a better workaround?
@pierreozoux, should sendmail_path also be removed or updated in light of https://github.com/piwik/docker-piwik/commit/b511e57a17ab57d9f2e947fc391f004990d7f1d3?
https://github.com/piwik/docker-piwik/blob/master/php.ini#L2
@dessant good catch, removed :)
I have added SSMTP to my Matomo Docker image to solved this issue if you are interesting. Check this important part of my entrypoint.sh.
I guess we can close this due https://github.com/matomo-org/matomo/issues/10914 and https://github.com/matomo-org/matomo/issues/10257