Use config environments
We need to use config environments feature and have 2 default set of configs - dev (debug) and prod. Selecting one should be done through YII_ENV environmental variable (or .env).
Same should be applied to all templates and demo apps.
See https://github.com/yiisoft/config/pull/64
Also need environment "test"
We should also get YII_ENV through getenv and not trough $_ENV since it's not populated by default. See https://mattallan.me/posts/how-php-environment-variables-actually-work/
Looks like there is a problem with getenv and nginx fastcgi_param
Yeah. May consider configuring it to fill getenv() or using https://github.com/symfony/dotenv.