Capistrano config.rb

Submitted by alexmoreno on Fri, 12/07/2012 - 00:56

set :application, "bounty app"

#set :repository,  "localhost:/var/www/git/bountyrepo"

set :repository,  "localhost:/var/www/git/blessed"


set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names

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

#



default_run_options[:pty] = true

set :use_sudo, false


#role :web, "localhost"                          # Your HTTP server, Apache/etc

#role :app, "localhost"                          # 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"

#

#set :deploy_to, "/var/www/html/staging"



task :staging do

  role :web, "localhost"

  set :deploy_to, "/var/www/html/staging"

  #set :deploy_via, :remote_cache

  #after('deploy:symlink', 'cache:clear')

end

task :live do
  role :web, "localhost"
  set :deploy_to, "/var/www/html/live"
  #set :deploy_via, :remote_cache
  #after('deploy:symlink', 'cache:clear')
end
task :live2 do
  role :web, "localhost"
  set :deploy_to, "/var/www/html/live2"
  #set :deploy_via, :remote_cache
  #after('deploy:symlink', 'cache:clear')
end
# if you're still using the script/reaper helper you will need
# 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:finalize_update do
        run "chmod -R g+w #{release_path}"
    end
    task:restart do
    end
 after "deploy:restart" do
   #add any tasks in here that you want to run after the project is deployed
     run "rm -rf #{release_path}.git"
  end
end

 

categorias