Skip to content

Instantly share code, notes, and snippets.

@willbarrett
Last active August 29, 2015 13:56
Show Gist options
  • Save willbarrett/9307877 to your computer and use it in GitHub Desktop.
Save willbarrett/9307877 to your computer and use it in GitHub Desktop.
Instructions for Capistrano Deploy

First, ensure you are in the jeffs-store directory.

To set up the environment for this deployment example, run these commands:

vagrant box add capistrano https://dl.dropboxusercontent.com/u/1863351/StarterSchoolFeb2014/capistrano.box
git checkout capistrano
git pull origin capistrano
bundle update
vagrant halt
vagrant up capistrano

You should now be able to go to http://192.168.33.10/ and see the jeffs-store application running.

To run a deploy from the jeffs-store directory, run:

cap deploy

You will be prompted for a password - type in the SSH password for the 'deploy' user on the virtual machine. I've set this password to 'deploy' on the vagrant machine for the exercise.

To deploy with migrations, run:

cap deploy:migrations

To roll back, run:

cap deploy:rollback

As you run these commands, watch the terminal output - you should start to get a feel for what's happening during a deploy and during a rollback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment