Skip to content

Commit

Permalink
Fixes yiisoft#245: Adjusted explanation of what -local.php configs ar…
Browse files Browse the repository at this point in the history
…e to make it cleaner
  • Loading branch information
samdark committed Nov 2, 2017
1 parent c2f96a1 commit 7cfbb6d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/guide/structure-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ By default there are two environments: `dev` and `prod`. First is for developmen
and debug turned on. Second is for server deployments. It has debug and developer tools turned off.

Typically environment contains application bootstrap files such as `index.php` and config files suffixed with
`-local.php`. These are either personal configs of team members which are usually in `dev` environment or configs of
specific servers. For example, production database connection could be in `prod` environment `-local.php` config.
These local configs are added to `.gitignore` and never pushed to source code repository.
`-local.php`. Local configs in `environments` directory are templates that, after `init` is executed,
are being copied into corresponding application config directories. After that, they become your local configuration.
They are meant to keep secret and environment-specific settings, such as database connection credentials,
and aren't meant to be put into version control system. Thus these files are added to `.gitignore` so git is not
considering them for staging.

In order to avoid duplication configurations are overriding each other. For example, the frontend reads configuration in the
following order:
Expand Down

0 comments on commit 7cfbb6d

Please sign in to comment.