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

Use config environments #166

Open
samdark opened this issue Jun 2, 2021 · 5 comments
Open

Use config environments #166

samdark opened this issue Jun 2, 2021 · 5 comments
Assignees
Labels
status:ready for adoption Feel free to implement this issue. type:enhancement Enhancement

Comments

@samdark
Copy link
Member

samdark commented Jun 2, 2021

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.

@samdark samdark added type:enhancement Enhancement status:ready for adoption Feel free to implement this issue. labels Jun 2, 2021
@samdark
Copy link
Member Author

samdark commented Jun 2, 2021

See yiisoft/config#64

@vjik
Copy link
Member

vjik commented Sep 22, 2021

Also need environment "test"

@samdark
Copy link
Member Author

samdark commented Nov 4, 2021

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/

@BoShurik
Copy link

BoShurik commented Nov 5, 2021

Looks like there is a problem with getenv and nginx fastcgi_param

@samdark
Copy link
Member Author

samdark commented Nov 5, 2021

Yeah. May consider configuring it to fill getenv() or using https://github.com/symfony/dotenv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for adoption Feel free to implement this issue. type:enhancement Enhancement
Projects
None yet
Development

No branches or pull requests

4 participants