-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add environment variables #8974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ProfM2 I like this, thanks for contributing it. However, using env vars is optional (even in Symfony 4), so I reworded your config to mention that it's optional. Thanks!
There are more virtual host config examples on this page. Should we update them all? And what about the Nginx example config? |
I wouldn't add them in the other Apache examples ... but if someone knows nginx, please tell us which is the equivalent config to add. Thanks! |
# optionally set the value of the environment variables used in the application
# fastcgi_param APP_ENV prod;
# fastcgi_param APP_SECRET <app-secret-id>;
# fastcgi_param DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name"; That should do the trick. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@ProfM2 thank you for helping us improving this. It was a nice first contribution to Symfony Docs. Congrats! |
This PR was merged into the 4.0 branch. Discussion ---------- Add environment variables Add server environment variables, specifically for production use. Commits ------- ab2c135 Added the env vars in the nginx config too 45c2939 Commented the env vars and mentioned that they are optional f64bc6b Add environment variables
Add server environment variables, specifically for production use.