Ask HN: How do you deploy your PHP apps to production?
11–20 of 57 posts
Re: Ask HN: How do you deploy your PHP apps to production?
#12Re: Ask HN: How do you deploy your PHP apps to production?
#13In some cases we can even create websites on the fly with a simple "hg clone"
I guess Git allows more or less the same workflow but Mercurial is easier for your designers.
Re: Ask HN: How do you deploy your PHP apps to production?
#14Re: Ask HN: How do you deploy your PHP apps to production?
#15Re: Ask HN: How do you deploy your PHP apps to production?
#16Re: Ask HN: How do you deploy your PHP apps to production?
#17Capistrano is better for the simple stuff, but once we started doing more we moved to phing.
Re: Ask HN: How do you deploy your PHP apps to production?
#18The only big change I needed to add was to tell it not to run the server restarting code, other then that it wasn't that hard.
Rollback support, and the fact that I don't have to login to the server and run commands each time I deploy is great.
Re: Ask HN: How do you deploy your PHP apps to production?
#19Capistrano works well, great git integration, but it does have some rails-isms you need to override to make it work sanely. The capistrano-php extension can help with that: http://github.com/namics/capistrano-php but you'll need to use gem to manage it. You'll also definitely want the multistage plugin which doesn't come standard. There were some bugs present in the CVS integration which may be a problem depending on your source control system.
I've also tried Fabric: http://docs.fabfile.org/0.9.2/ I liked the tool. I found it a bit more low level then Capistrano but also a little simpler to work with. It comes prepackaged (albeit an older version) in Ubuntu without any dependencies other than stock python which our sysadmin preferred to using Ruby gems. I do recommend the new version found in pip though. The two main problems with Fabric are its lack of any integration plugins and the Paramiko SSH library it uses has no support for SSH key forwarding (there is a workaround: http://lincolnloop.com/blog/2009/sep/22/easy-fabric-deployme... but it has its own set of problems).
In the end, neither worked out for me. Capistrano had to much of a learning curve for my co-workers and Fabric wouldn't work with our SSH setup. For now, I'm using a script in our working directory that I SSH to, run, and it updates the code in place. Crude, but ultimately effective. That said, definitely looking forward to a replacement.