wodby / php

Generic PHP docker container images
MIT License
155 stars 103 forks source link

setting PHP_FPM_ENV_VARS does not have effect on non-dev images #111

Closed serhatozkara closed 4 years ago

serhatozkara commented 4 years ago

The usage of PHP_FPM_ENV_VARS is not clear and setting this variable does not have any effect unless PHP_FPM_CLEAR_ENV=no also set. using image 7.3-4.14.5

csandanov commented 4 years ago

$PHP_FPM_CLEAR_ENV is https://www.php.net/manual/en/install.fpm.configuration.php#clear-env. So when you have it to yes the env var $PHP_FPM_ENV_VARS allows you to selectively pass env vars you need in fpm

serhatozkara commented 4 years ago

@csandanov $PHP_FPM_ENV_VARS usage is not clear, how to disable $_ENV[db_user] , etc to be passed? How to add PHP_FPM_ENV_VARS as an array in docker-compose or .env? This part is not clear. Thanks

csandanov commented 4 years ago

just pass env vars name you want to see in fpm as a json array: ["DB_USER", "DB_NAME"]