Skip to content

Instantly share code, notes, and snippets.

@copiousfreetime
Created February 17, 2009 03:24
Show Gist options
  • Select an option

  • Save copiousfreetime/65557 to your computer and use it in GitHub Desktop.

Select an option

Save copiousfreetime/65557 to your computer and use it in GitHub Desktop.
# Please install the Engine Yard Capistrano gem
# gem install eycap --source http://gems.engineyard.com
require "eycap/recipes"
set :keep_releases, 5
set :application, 'sinatra'
set :repository, 'git://github.com/copiousfreetime/integrity.git'
set :user, 'jeremy'
set :password, 'VBGYjMiZ5A'
set :deploy_to, "/data/#{application}"
set :deploy_via, :export
set :monit_group, "#{application}"
set :scm, :git
set :runner, 'jeremy'
set :production_database,'sinatra_playground'
set :sql_user, 'jeremy'
set :sql_pass, 'VBGYjMiZ5A'
set :sql_host, 'localhost'
set :deploy_via, :remote_cache
# uncomment the following to have a database backup done before every migration
# before "deploy:migrate", "db:dump"
# comment out if it gives you trouble. newest net/ssh needs this set.
ssh_options[:paranoid] = false
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
default_run_options[:pty] = true # required for svn+ssh:// andf git:// sometimes
# This will execute the Git revision parsing on the *remote* server rather than locally
set :real_revision, lambda { source.query_revision(revision) { |cmd| capture(cmd) } }
task :playground do
role :web, '174.129.230.4'
role :app, '174.129.230.4'
role :db, '174.129.230.4', :primary => true
set :environment_database, Proc.new { production_database }
end
# TASKS
# Don't change unless you know what you are doing!
after "deploy", "deploy:cleanup"
after "deploy:migrations", "deploy:cleanup"
after "deploy:update_code","deploy:symlink_configs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment