Skip to navigation

Cap deploy via SCP

Published November 20, 2007

Using a code revision system your deployment host doesn’t support? Use Capistrano’s copy deployment strategy:


set :deploy_via, :copy

# and if you don't feel like putting your source code
# in /tmp on a shared host
set :copy_remote_dir, "/home/#{user}/tmp" 

Capistrano will checkout your project locally, zip it up and scp it to the releases directory on the deployment host.

Now you can tell your host to git farked (though no promises they won’t nuke your all your data, BOFH style)

Archived comments

Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.

  1. Michael Koukoullis

    Get git or git farked. Have set it up on my new slice, planning to use gitosis to host repositories.

  2. Aníbal Rojas

    Actually, it is usefull if you are deploying to a server under the administration of a paranoid sysadmin blocking every port and protocol differente from SSH and HTTP ;-)

  3. Kurt Werle

    Very useful. I do with that the cap documentation was a little fuller, and I didn’t have to google for “capistrano scp” to find out how to do this.

    Thanks!

  4. ae

    Technically, its using sftp, not the same thing as scp.

    You have to configure an ftp server and all that BS, why not just use scp out of the box?

Articles

toolmantim

I'm Tim Lucas, a user experience designer and developer currently in Sydney Australia.

I run a web application design and development company Agency Rainford, present on various technical topics, snap the occasional photo, tweet my going-ons, share teh codes and post other tid-bits to the tumble.

Most recently I published LAN hacking with Bananajour (June 11, 2009)

Shoot an email to and say hello.

Powered by procrastination