Deploy with git

Hello,

I’m new with Git and I’m looking for a good process to deploy on my server. Especially regarding migrations.
What I would off the top of my head :

  • on my computer, put the online database setting on the config
  • push and pull everything
  • on my computer, put the local setting and add the config to gitignore.

Is that wrong ? Is there a better way to do it ? Probably i guess, but what is it ?
And what about migrations to come ?

1 Like

Take a look at https://github.com/deployphp/deployer, it would provide you a good start for building your deploy scripts.
You can create per project deploy configurations and define different target environments. Then deployment could be configured to either pull the code from your git repo (using a deploy key for example) or copy the code to the target environment via ssh.