[Proposal] Don't name the default environment "production"
The default environment name returned by App::environment() is "production".
I think that almost no developer will use the root config files for his production environment as you are not advised to store any sensitive information inside your repository. Also you want to turn off debugging, etc.
So I am pretty sure that most people will create a separate config folder and use the default files locally. In many cases the real production folder will be named "production". Although this will work it can cause confusion if your environment detection doesn't work and App:environment() will return "production".
What do you think?
What would happen in cases where you have an app that is running on something like AWS that auto scales, and automatically brings up new instances, each of which will have a different machine name, so you can't automatically map the new (unknown) machine name in your bootstrap/start.php files $env variable?
I think the current environment setup makes pretty good sense really.
On Apr 17, 2013, at 8:02 PM, Chris Duell [email protected] wrote:
What would happen in cases where you have an app that is running on something like AWS that auto scales, and automatically brings up new instances, each of which will have a different machine name, so you can't automatically map the new (unknown) machine name in your bootstrap/start.php files $env variable?
— Reply to this email directly or view it on GitHub.
Agreed, it allows for easier scaling in production.
Ok, I agree but also I think that someone who autoscales his Laravel application through AWS can surely figure out a nice way to do this. And in any case you could still use your base folder for the config even if it isn't called "production".
I try to view it from the other side, the beginners point of view. In this case you will have something named production which usually isn't. Maybe "default" would make more sense as name in both mentioned cases.
On the other hand I agree with Taylor. This proposal is something really meticulous. Just wanted to bring it up to hear your opinions.