10
votes

For my web application running on LAMP, I need to be able to deploy database migrations and code changes on multiple servers and be able to test deployment afterwards, all of this automatically done by scripts.

Currently I'm torn between using directly my build tool (Phing) with some special deployment/test tasks, or shell scripts, or a scripting language like Ruby or Python.

The problem is that I feel that a build tool should be used to build, not to deploy. I also feel that shell scripts are hard to maintain and not very readable.

Do you have any good advice on this subject ?

6

6 Answers

4
votes

For PHP projects, Phing is the way to go. Deployment is definitely one of its intended usage, considering that in PHP there isn't any "real" build process - as scripts are not compiled.

From the official site:

If you find yourself writing custom scripts to handle the packaging, deploying, or testing of your applications, then we suggest looking at the Phing framework.

Phing can do everything shell/python/ruby scripts can do, and can be extended in PHP which is its major draw for PHP developers. Why would you want to use ruby/python if you are a PHP developer?

3
votes

Rasmus Lerdorf (creator of PHP) released a deployment tool called WePloy.

3
votes
2
votes

To deploy web applications, PHP or other, in some click, you can use fredistrano.

0
votes

What have I used?

  • svn post-commit hook
  • shell script to rsync
  • perl cgi script to svn switch across systems

It doesn't seem like any of these would be acceptable for you though, given your statement "I also feel that shell scripts are hard to maintain and not very readable."

0
votes

Personal script which uses Svn export + rsync