Instructions for setting SYMFONY_ENV on Heroku#4591
Conversation
|
looks good to me |
|
Wanna merge it? And where do you think general docs on that env var should go?
|
I'm not a member of the doc core team. I don't have merge rights on this repo |
|
@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. |
There was a problem hiding this comment.
Our standard is to not use Oxford commas.
There was a problem hiding this comment.
But this is a subordinate clause, not a list of items, no?
There was a problem hiding this comment.
I'm actually not completely sure. Maybe our native speaker @weaverryan can make it clear.
There was a problem hiding this comment.
@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 to app.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.
Bah, nevermind - now I see the next section... - let me read the rest
|
I only see some minor issues. Besides that 👍. |
|
Is this ready for a merge, @weaverryan ? |
This PR was merged into the 2.3 branch. Discussion ---------- Instructions for setting SYMFONY_ENV on Heroku 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 at http://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 feedback 579fdd6 capitalize section title as per feedback 5f987ff instructions for setting SYMFONY_ENV on Heroku for smooth deploys
|
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! |
|
@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). |
|
@weaverryan In to read env var |
|
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 |
|
@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. |
|
@stof My super crude approach to hack it in was this (the |
|
your approach will be broken, because lots of strings can be callables. |
|
Yeah, could also check for |
|
Did you push your work somewhere publicly? :) I'm curious! |
|
@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 on https://github.com/Incenteev/ |
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 at http://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?