I'm running php7-fpm in a docker container. However my php scripts aren't able to access environments variables set in my docker-compose file. getenv('MY_ENV_VAR')
returns FALSE
.
I've changed /etc/php/7.0/fpm/pool.d/www.conf
to include clear_env = no
and restarted with service php7.0-fpm restart
but my environment variables start aren't there.
I've also tried editing /etc/php/7.0/fpm/php.ini includes the line variables_order = "EGPCS"
.
When I exec into my container on a bash shell I can see that my variables exist. It's just that they're not accessible in my php scripts.
What am I missing?