Skip to content

Instantly share code, notes, and snippets.

@elben
Created March 5, 2011 05:35
Show Gist options
  • Save elben/856154 to your computer and use it in GitHub Desktop.
Save elben/856154 to your computer and use it in GitHub Desktop.
set :application, "myapp"
set :repository, "[email protected]:myapp.git"
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :user, "ubuntu"
set :use_sudo, false
set :location, "MY_EC2_PUBLIC_DNS"
default_run_options[:pty] = true
ssh_options[:keys_only] = true
ssh_options[:config] = false
ssh_options[:keys] = ["/home/ubuntu/.ssh/id_rsa"]
ssh_options[:verbose] = :debug
ssh_options[:forward_agent] = true
ssh_options[:port] = 22
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require "capistrano"
require "rvm/capistrano" # Load RVM's capistrano plugin.
set :rvm_ruby_string, '1.9.2-head@cc' # Or whatever env you want it to run in.
set :rvm_type, :user
#set :default_environment, {
#'PATH' => "/path/to/.rvm/gems/ree/1.8.7/bin:/path/to/.rvm/bin:/path/to/.rvm/ree-1.8.7-2009.10/bin:$PATH",
#'PATH' => "/home/ubuntu/.rvm/gems/ruby-1.9.2-head@cc/bin:/home/ubuntu/.rvm/bin:$PATH",
#'RUBY_VERSION' => 'ruby 1.9.2',
#'GEM_HOME' => '/home/ubuntu/.rvm/gems/ruby-1.9.2-head@cc/',
#'GEM_PATH' => '/home/ubuntu/.rvm/gems/ruby-1.9.2-head@cc/',
#'BUNDLE_PATH' => '/home/ubuntu/.rvm/gems/ruby-1.9.2-head@cc/' # If you are using bundler.
#}
# We'll use the default, which is /u/apps/...
# set :deploy_to "/u/apps/#{application}"
role :web, "MY_EC2_PUBLIC_DNS" # Your HTTP server, Apache/etc
role :app, "MY_EC2_PUBLIC_DNS" # This may be the same as your `Web` server
role :db, "MY_EC2_PUBLIC_DNS", :primary => true # This is where Rails migrations will run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment