Skip to content

Instantly share code, notes, and snippets.

@toolmantim
Created May 9, 2009 06:17
Show Gist options
  • Select an option

  • Save toolmantim/109156 to your computer and use it in GitHub Desktop.

Select an option

Save toolmantim/109156 to your computer and use it in GitHub Desktop.
# An example of the simplest possible Capfile. Useful for redeploying small
# apps hosted with mod_rails. It doesn't import the standard cap recipes
# (such as setting up the app on the server) it simply handles redeployment.
#
# I was meant to show it at the RORO Sydney May meetup during my preso:
# http://www.slideshare.net/toolmantim/roro-may-lightning-preso-madness
#
# This was taken pretty much straight from the Capfile for
# http://byjodiemcleod.com
ssh_options[:keys] = %w(~/.ssh/id_rsa ~/.ssh/id_dsa)
ssh_options[:forward_agent] = true
set :user, "myapp"
set :use_sudo, false
role :appserver, "myserver.com"
desc "Redeploy the app"
task :deploy do
run "/var/www/myapp.com/app; git pull; touch tmp/restart.txt"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment