R
R
rumasterov2016-01-22 17:18:55
Yii
rumasterov, 2016-01-22 17:18:55

How to solve the issue with configurations when deploying a PHP (Yii2) application?

Hello.
There is a PHP application on Yii2, there is a config/main.php file, which describes the settings for connecting to a database, third-party api services. These settings are different for the dev server and production, different data for connecting to the database and for connecting to third-party api services.
How to solve the issue with configs when deploying an application from git (github)? No access data is committed in the repository.
I looked towards deployer.org , it seems ok, but I still don’t understand how to pull up the necessary configuration for a specific server (dev and production).
Please share your experience of deploying an application with different configurations.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2016-01-22
@Sassoft

For the advanced template, there is an environments utility there, the only question will be that after loading the code, you need to initialize the desired environment and drive the necessary values ​​\u200b\u200bin the config.

E
eskrano, 2016-01-22
@eskrano

gitignore?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question