Cakephp configuration changes deploy

I made some configuration changes in app.php locally.(cakephp 3) For obvious reasons it is ignored by git. So when I deploy to staging/production I need to edit the changes manually. Is there a better/recommended way to apply these changes?


You might want to look at some sort of configuration management. I’ve used both ansible and puppet in the past with good results. If configuration management isn’t your cup of tea, many folks use environment variables to handle configuration values that vary between different environments. The default app skeleton comes with environment variable support out of the box.

I haven’t use configuration management before so I don’t know if that is the case.
I would like this scenario to happen:
I add new configuration variable that depends on server settings, to my local environment.

I deploy using git - push th code form my local machine and then pull on dev/production

I would like to have a message while pulling like:
“Hey ! there is a configuration variable missing here named -------. Please fix it and try again!”

I guess it should involve getting app.php out of ignore and using some git hook or something.

What do you say?

My approach was to have an extras.php in /config directory and than load it in bootstrap.php
So all extra configuration goes to extras.php and this file is not commited into git.