yiisoft / app

Yii3 application template

Home Page:https://www.yiiframework.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use config environments

samdark opened this issue · comments

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.

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.