-
Notifications
You must be signed in to change notification settings - Fork 132
Description
Is your feature request related to a problem? Please describe.
Storing configuration settings in a file is a bit troublesome. Maintaing a file between different environments can be difficult.
Describe the solution you'd like
I would like for ExpressionEngine to store configuration settings in environment variables, or at least have that option. It could check if the environment variable is set, if it is set it would use it, but if it isn't set it would use a setting from the .env.php (or similar) file. At the time of writing this I don't see any potential drawbacks.
Describe alternatives you've considered
The config.php is in the .gitignore file, so I am free to edit it as I see fit and it won't be checked into any repo. I could set my environment variables, and have the config.php file use the getenv() function to retrieve the data.
Teachability, Documentation, Adoption, Migration Strategy
The user could then store their configuration settings in environment variables which would allow them to easily have different stages of development. It would require an update to the System Configuration Overrides, and potentially other places.
Documentation change
$config['allow_avatar_uploads'] = 'y';
// would become
putenv('allow_avatar_uploads=y'); // The environment variable may be all uppercase
Migration Strategy
Allow both config methods. Maybe deprecate the current way in the next major release. Of course one way would need to override the other way, and that would need to be decided.
- I am capable and would like to work on an implementation of this feature if it is considered.