I'm building an open-source issue tracking and project management application called Emperor in Scala using the Play Framework. Recently there was discussion on the Play mailing list about deploying Play applications so I thought it might be useful to demonstrate how I deploy Emperor using Capistrano.
Isn't Capistrano For Rails?
Capistrano — or just cap as it is often called — is widely used for deploying Ruby on Rails applications. But it's possible to use cap for deploying any type of app you like. At Twitter it's used to deploy pretty much anything you can imagine.
So I set out to use it for Emperor because it's deploy and rollback process is quite nice. Here's how you do it.
Going Off The Rails
I'm assuming you've already got cap installed. If not then do read the docs.
The first step is to install the railsless-deploy gem. You can find instructions for installation and use in the linked documentation. If you check the docs it will advise you toward a simple Capfile.
Here's a complete
Capfile with comments explaining the bits.
Capistrano is a great tool but I've find it to be poorly documented. The above Capfile took me a few hours to piece together. That being said I'm very happy with how it works! Hopefully this helps other Capistrano users that are deploying non-Rails systems.