Question

I have a site skeleton built on Laravel 4 in a private git repo on Bitbucket. Our very small team each has their own local development copy, and there's also a version of the site on a development environment which we use to display things to clients. In addition, there's a branded production version of the site open to the public, and we're in the process of setting up two or three new sites based on the same git repo.

Now, installing new sites is ridiculously easy... but I don't really know how to keep them all properly updated except for logging in and pulling manually every time we make an update. Ideally, I would like to be able to specify that a commit to the repo triggers all of the production environments to pull the new version.

Is this something which can be easily done, and if so, how? We're expecting to release more and more sites based on the template, and I would prefer to set it up correctly from the beginning, rather than throwing something together after it's become a problem.

Was it helpful?

Solution

There are some tools available to help you with that, like Capistrano, but I could not find one, written in PHP, which was able to do it via github/bitbucket hooks, so I built a package to help me with that: https://github.com/antonioribeiro/deeployer.

It uses Laravel Envoy to provide some scripting to your deployment process.

Using Envoy make it easy to run your tasks manually in the command line by doing:

cd <your deployer directory>

envoy run <task name>

An example would be:

envoy run https://github.com/antonioribeiro/deeployer:master
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top