Community contributed extensions

Play Capistrano Module

Very draft of the module, contributions are welcome

This module is released under Apache License 2.0

This is a very first draft of a Play module allowing to deploy easily a play app on a remote server with Capistrano, this marvelous remote control tool!
Capistrano is written in Ruby and if you are like me, a complete noob in Ruby, you certainly don’t want to write any line of Ruby within a Play application.
This module is aimed at that without preventing people more skilled in Capistrano and Ruby to do what they want.


Install/Learn Capistrano

I had problems using Ubuntu Synaptic packages so I installed manually with RVM and this is perfect. Go there

To learn the basics of Capistrano, go there

Install Play Capistrano module in your conf/dependencies.yml

play -> capistrano 1.0.0

Don’t forget to run the traditional play deps

Run the play capify command

Play-Capistrano module is delivered with one single command for the time being:

play capify

This command copies the following required Capistrano files to your project (this is not perfect because it duplicates files from module):

For an unknown reason, it’s impossible to run a background shell command from capistrano directly and you must wrap it into a shell.

Edit conf/deploy.rb with your remote/VCS config

Just edit the file and replace parts in UPPER CASE

Then you enter into Capistrano world...

A few links:

The tweaked Capistrano Play recipes

Thanks to this Stackoverflow post for giving me a very good ground knowing my complete incompetence in Ruby:

cap deploy:start

This remote start the server in nohup using the to make it background.

cap deploy:stop

This remote stops the server.

cap deploy:restart

This remote stops/starts the server.

cap play:logs

This “tail -f” remote logs.

cap play:kill

This kills the remote server.

cap play:ps

This view remote process info.

cap play:pid

This retrieves play application pid.

cap play:status

This retrieves play application status.

cap play:version

This retrieves play application version.