We trying to setup symfony project and drive the config from system environment variables.
We are using Ubuntu 18 with
zsh, php-fpm7.4 and nginx.
While trying a bunch of things, I setup the variables in both places
export DB_USER='<user>' export DB_PASS='<pass>' export DB_URL='<url>'
/etc/environment, but without the
Through the CLI the variables are accessible. However, on web request nothing is there.
So, I found at some point that nginx strips them out unless you define otherwise.
Added the following into
env DB_USER; env DB_PASS; env DB_URL;
How do I make sure that environment variables available in CLI and web request?
Source: Symfony Questions
Was this helpful?
0 / 0