-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
lefuturiste/docker-templates
#1Description
If you use the php-fpm variant, environment variables (e.g. for linked docker hosts) are not available in your $_ENV
var in your PHP scripts. This is a problem as usually docker containers are configured via environment variables (following the 12 factor principles). While this is rather a PHP problem, I still think that the official php-fpm image should provide a workaround for this, as otherwhise it's pretty much useless.
For php-fpm all environment variables have to be listed in the php-fpm.conf
like:
[www]
env[MY_ENV_VAR_1] = 'value1'
env[MY_ENV_VAR_2] = 'value2'
So I suggest to create a wrapper script to first add all variables from env
to the configuration, before actually starting php.
rloth, slissner, blackandred, lishuhao, famousgarkin and 12 more
Metadata
Metadata
Assignees
Labels
No labels