docker icon indicating copy to clipboard operation
docker copied to clipboard

default email configuration with env var

Open pierreozoux opened this issue 9 years ago • 7 comments

@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.

pierreozoux avatar Sep 12 '16 07:09 pierreozoux

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:

tianon avatar Sep 13 '16 22:09 tianon

Ok, closing this, actually, piwik as a way to configure smtp.

related to https://github.com/piwik/docker-piwik/commit/b511e57a17ab57d9f2e947fc391f004990d7f1d3

pierreozoux avatar Nov 25 '16 18:11 pierreozoux

I don't get it, so how to configure it via ENV vars?

vanthome avatar Nov 25 '16 20:11 vanthome

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 avatar Nov 26 '16 09:11 pierreozoux

@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 avatar Dec 22 '16 14:12 dessant

@dessant good catch, removed :)

pierreozoux avatar Dec 23 '16 06:12 pierreozoux

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.

crazy-max avatar Jan 21 '18 14:01 crazy-max

I guess we can close this due https://github.com/matomo-org/matomo/issues/10914 and https://github.com/matomo-org/matomo/issues/10257

J0WI avatar Nov 26 '22 15:11 J0WI