Skip to content

Commit

Permalink
Added Capistrano deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsark committed Aug 3, 2011
1 parent c620dab commit a76356b
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions config/deploy.rb
@@ -1,22 +1,39 @@
set :application, "set your application name here"
set :repository, "set your repository location here"
$:.unshift(File.expand_path('./lib',ENV['rvm_path']))

require 'rvm/capistrano'
require 'bundler/capistrano'

set :application, "hello_sinatra"
set :repository, "git://github.com/arunsark/hello_sinatra.git"
set :branch, "develop"

set :scm, :git
set :user, "hello_sinatra.com"
set :deploy_to, "/home/hello_sinatra.com/apps/#{application}"
set :use_sudo, false
set :keep_releases, 5
set :rvm_type, :system
set :rvm_bin_path, '/usr/local/rvm/bin'

set :scm, :subversion
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

role :web, "your web-server here" # Your HTTP server, Apache/etc
role :app, "your app-server here" # This may be the same as your `Web` server
role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
role :db, "your slave db-server here"
role :web, "localhost" # Your HTTP server, Apache/etc
role :app, "localhost" # This may be the same as your `Web` server
role :db, "localhost", :primary => true # This is where Rails migrations will run
set :port, 2200
#role :db, "your slave db-server here"


# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

# If you are using Passenger mod_rails uncomment this:
# namespace :deploy do
# task :start do ; end
# task :stop do ; end
# task :restart, :roles => :app, :except => { :no_release => true } do
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
# end
# end
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end

after "bundle:install"

0 comments on commit a76356b

Please sign in to comment.