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

Docs Installation db setting in env folder #123

Closed
kmergen opened this issue Feb 11, 2016 · 6 comments
Closed

Docs Installation db setting in env folder #123

kmergen opened this issue Feb 11, 2016 · 6 comments

Comments

@kmergen
Copy link

kmergen commented Feb 11, 2016

In installation guide Create a new database and adjust the components['db'] configuration in common/config/main-local.php accordingly.

I think it is better to set it in environment folder.

@samdark
Copy link
Member

samdark commented Feb 11, 2016

For development — nope.

@samdark samdark closed this as completed Feb 11, 2016
@kmergen
Copy link
Author

kmergen commented Feb 11, 2016

What is when I have a third env e.g. 'blog' and annother db config for the blog.
I switch to blog env and when I override all my config gone away.

Then the logical question must be for for which purpose is the /environments/dev/common/config/main-local.php file.

@samdark
Copy link
Member

samdark commented Feb 12, 2016

#120

@kmergen
Copy link
Author

kmergen commented Feb 12, 2016

That means when you have choose an environment than you should never switch it to annother environment in the same project folder. Because when you do this the whole configuration in the project-folder/common/config/main-local.php will be overriden by the environment /env/config/main-local.php:

@samdark
Copy link
Member

samdark commented Feb 12, 2016

Well, it asks you what do you want to override. Also there's an option to always skip local files.

@kmergen
Copy link
Author

kmergen commented Feb 12, 2016

Ok. It make sense to use it only once with application init.
Is it right when I say the environment/dev/config/local-main.php file is only an example configuration file to use it once to init the applications environment and the workflow is as follow:

  1. init env (e.g. dev)
  2. make changes in project-folder/common/config/def/main-local.php.
  3. If I want I can copy my configuration to environment /dev/config/local-main.php to archive it.

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