HomeDevCentral

Environment propagation: php-fpm
Audit Required4db5eec56beb

Description

Environment propagation: php-fpm

We now also propagate the environment to php-fpm, so the web application
can get access to the variables set in container.

This allows to configure the application at docker run step if it follows
the http://12factor.net/config recommandation.

We don't use clear_env = false but filter the environment with a PHP
script, to discard the MYSQL_ENV_MYSQL_ROOT_PASSWORD variable, introduced
by the MySQL official Docker image if we link a container to the web one
using --link <MySQL container name>:mysql (Docker propagates environment
from a container to linked containers).

In files/usr/local/lib/php-fpm-env/PhpFpmEnvironment.php, behavior could so
be customized to prepare an environment with the desired level of complexity.

Details

Group Auditors
Reviewers
Provenance
derecksonAuthored on
Parents
rDPHPFPMd534ad32a1f5: Environment propagation: sh → bash
Branches
Unknown
Tags
Unknown