Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Instructions for setting SYMFONY_ENV on Heroku#4591
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
dzuelke commentedDec 5, 2014
stof commentedDec 5, 2014
looks good to me |
dzuelke commentedDec 5, 2014
Wanna merge it? And where do you think general docs on that env var should go?
|
stof commentedDec 5, 2014
I'm not a member of the doc core team. I don't have merge rights on this repo |
javiereguiluz commentedDec 5, 2014
@dzuelke thanks for this nice improvement and for documenting the You are right about the necessity of documenting more these variables (there is an opened issue related to this:#4162). However, as this is a quick fix for Heroku, my proposal for doc managers (@weaverryan,@wouterj and@xabbuh) would be to merge this PR right away and keep#4162 open to discuss more about where and how to document these variables. |
dzuelke commentedDec 5, 2014
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.
Our standard is to not use Oxford commas.
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.
But this is a subordinate clause, not a list of items, no?
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.
I'm actually not completely sure. Maybe our native speaker@weaverryan can make it clear.
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.
@dzuelke what do you mean by:
you will ensure that your Symfony application runs the
prodenvironment
I mean, does the user need to do something here? Or do we just mean, double-check that things are ok when you go toapp.php locally, just to be sure first? I'm just not sure myself, so I want it to be clear for others :)
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.
Bah, nevermind - now I see the next section... - let me read the rest
xabbuh commentedDec 5, 2014
I only see some minor issues. Besides that 👍. |
dzuelke commentedDec 6, 2014
Is this ready for a merge,@weaverryan ? |
This PR was merged into the 2.3 branch.Discussion----------Instructions for setting SYMFONY_ENV on HerokuMuch smoother sailing with that step included :)On a related note, I was going to add general advice on using `SYMFONY_ENV`, as it is currently very under-documented (just one aside mention athttp://symfony.com/doc/current/cookbook/deployment/tools.html#c-update-your-vendors), but I wasn't sure where to do this. Maybe in `cookbook/configuration/environments.rst` and a few other places?Commits-------576bbfb remove first person as per feedback579fdd6 capitalize section title as per feedback5f987ff instructions for setting SYMFONY_ENV on Heroku for smooth deploys
weaverryan commentedDec 6, 2014
Hey David! Merged! Thanks for this - I really want the Heroku instructions to be rock solid :). I created a follow-up PR with some minor formatting things - see#4601. We still have#4217 open, which has some Heroku-deploy issues and discussion. In particular, I'm personally still unclear how parameters.yml should be handled. As you see on that issue, you can use the Thanks! |
stof commentedDec 16, 2014
@weaverryan the env-map feature of Incenteev/ParameterHandler has been implemented precisely to be able to provide the parameters through heroku config vars to build the parameters.yml (which is still ignored in the git repo) (disclaimer: I'm deploying my Symfony app on Heroku since 2 years at work). |
dzuelke commentedDec 16, 2014
@weaverryan In to read env var |
dzuelke commentedDec 16, 2014
Mind you that there is a caveat though with both this approach and a However, it is possible for env vars to change, either because the user changes them (through In that case, an empty Git push would have to be made to restore the app to working order. I started looking into generating a |
stof commentedDec 16, 2014
@dzuelke I'm planning to try writing a bundle hooking into the container to change some service arguments to be retrieved dynamically from the environment at runtime (with a fallback to the configured parameter), precisely to support the case of Heroku Postgres HA plans. I will give you some feedback in a few days after my experiments. |
dzuelke commentedDec 16, 2014
@stof My super crude approach to hack it in was this (the |
stof commentedDec 19, 2014
your approach will be broken, because lots of strings can be callables. |
dzuelke commentedDec 19, 2014
Yeah, could also check for |
dzuelke commentedDec 19, 2014
Did you push your work somewhere publicly? :) I'm curious! |
stof commentedDec 19, 2014
@dzuelke not yet. It is still in progress. I will open-source it this evening hopefully, or in the coming days (depending of how much time it takes me to have the initial version working). Watch new repos appearing onhttps://github.com/Incenteev/ |
stof commentedDec 22, 2014
@dzuelke here it is:https://github.com/Incenteev/DynamicParametersBundle |
This PR was merged into the 2.3 branch.Discussion----------[Heroku] A few more tweaks to outline the steps| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | 2.3+| Fixed tickets | n/aHey guys!This is just a tweak to#4591 - it's just a minor organizational thing so that (hopefully) it's even more clear what 3 steps you need to take.Thanks!Commits-------8c7e3b2 Changing to #. format4ee7cef A few more tweaks to outline the steps
Much smoother sailing with that step included :)
On a related note, I was going to add general advice on using
SYMFONY_ENV, as it is currently very under-documented (just one aside mention athttp://symfony.com/doc/current/cookbook/deployment/tools.html#c-update-your-vendors), but I wasn't sure where to do this. Maybe incookbook/configuration/environments.rstand a few other places?