I'm working on PHP web applications (mainly built on top of CodeIgniter). What is an easy way to deploy such sites? Right now, deployment generally consist of:
- Shutting the site down
- Doing an
svn up
This is fine for the most part. However, I do want to do a few other things:
- Attach a version number to the filenames of images, scripts, and style sheets if the one on production site is different from what is in version control (and update all references in the mark up, scripts, etc. to these new file names)
- Minify all scripts and stylesheets (and update all references in the mark up, scripts, etc.)
The ability to roll back would be nice, too.
I know about Phing and Ant, but have no experience using these tools. Suggestions?
I only have experience with Phing and not much of it (mainly a Python developer), but from what I've seen, the advantages are:
- Ant is more mature, has a lot of plugins, and will integrate readily with the various Java-based continuous integration servers but doesn't understand PHP classpaths.
- Phing comes with build tasks for PHP tools like PhpDocumentor but is less mature. However, you don't have to potentially install a ton of extra dependencies and an entire new runtime and SDK just for your build system and you can write new Phing tasks in PHP.
As for minifying, have you considered any of the wrappers that automatically handle compacting and caching page assets as they change?
...and that's just from the first page of results for these Google searches.