A
A
Andrey2016-04-20 15:50:05
Yii
Andrey, 2016-04-20 15:50:05

Yii2-advanced, how to store configs?

There is yii2-advanced.
It has configs like *-local.php Is
it correct to store data for them in enviroments/*/config and run ./init with each deployment?
either ./init is run once? BUT, if someone accidentally launches it after - does the configs get rubbed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor, 2016-04-20
@VladimirAndreev

Environments/**/config and environments/**/web store "templates" configs (*-local.php) and front controllers (index.php, index-test.php), which, when ./init is executed, are simply copied to corresponding directories.
If desired, "templates" can be edited to fit your needs.
./init is usually executed once. On the machine where we develop, we initialize dev, on the pro server, the prod environment. In the future, just edit *-local.php files.
If, for some reason, we performed ./init again, then we will be told which files have changed and what to do with them (leave or overwrite). Assuming ./init is done interactively.
Open and look at the init file. There's nothing complicated...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question