Created
September 2, 2012 11:00
-
-
Save NikoRoberts/3596877 to your computer and use it in GitHub Desktop.
deploy.rb - simple single stage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rvm/capistrano" | |
set :rvm_type, :user | |
default_run_options[:pty] = true # Must be set for the password prompt | |
set :application, "HelloWorld" | |
set :repository, "[email protected]:NikoRoberts/hellorackspace.git" | |
set :branch, "master" | |
set :deploy_via, :remote_cache | |
set :scm, :git | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
set :user, "deployer" # The server's user for deploys | |
role :web, "198.101.247.93" # Your HTTP server, Apache/etc | |
role :app, "198.101.247.93" # This may be the same as your `Web` server | |
role :db, "198.101.247.93", :primary => true # This is where Rails migrations will run | |
# if you want to clean up old releases on each deploy uncomment this: | |
after "deploy:restart", "deploy:cleanup" | |
# if you're still using the script/reaper helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
set :deploy_to, "/var/www/helloworld/" | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment