Skip to content
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

Load settings file based on the environment #11

Open
olofbokedal opened this issue Dec 1, 2017 · 2 comments
Open

Load settings file based on the environment #11

olofbokedal opened this issue Dec 1, 2017 · 2 comments

Comments

@olofbokedal
Copy link

We should add the possibility to create settings files specific for each environment, such as settings.testing.php and settings.development.php. These file should get included based on the value of APP_ENV and be managed via git.

This would ensure that the site behaves in the same way for every server, based on the current environment.

We should still support settings.local.php and ignore this in git since that will allow everyone to create overrides specific for their needs without committing these to the repo.

@NormySan
Copy link
Contributor

NormySan commented Dec 1, 2017

I'm not sure about this one, I did this on the first implementation but i found that it wasn't very useful since it's better to have things that change from environment to environment defined in the .env file.

If we implement this i think we should only change the include code and not add any example files since it just gets messy in my opinion.

@olofbokedal
Copy link
Author

I think it serves a purpose since a settings.php file is way more flexible than the .env. Environment variables are great for values that are different from machine to machine. But settings files are better at handling Drupal settings and configuration, and settings files that are specific to an environment makes that environment behave the same way no matter which machine that environment is running on.

Agreed regarding the example files though, no need for them since a person working with the settings is assumed to have knowledge about the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants