Created
June 1, 2010 07:24
-
-
Save rociiu/420675 to your computer and use it in GitHub Desktop.
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
set :application, "My supper app" | |
set :repository, "svn://yoursvnhost/svn/yourproject/" | |
set :scm, :subversion | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
role :web, "http://mywebserver.com" # Your HTTP server, Apache/etc | |
role :app, "http://myappserver.com" # This may be the same as your `Web` server | |
role :db, "http://mymaindbserver.com", :primary => true # This is where Rails migrations will run | |
role :db, "http://myslaveserver.com" | |
set :deploy_to, '/www/your_deployment_path' # the deployment path in your server deployment | |
#set :port, 609 # specify your ssh port , your may change the default port(22) due to security issue | |
set :user, "root" # which user would be used to run the deployment process | |
set :scm_username, "xxxx" #your svn username | |
set :scm_password, "1111" #your svn password | |
set :use_sudo, false | |
# If you are using Passenger mod_rails uncomment this: | |
# if you're still using the script/reapear helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
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')}" | |
# restart your app server after the deployment process | |
end | |
end | |
namespace :custom do | |
desc "custom task need to run after deployment" | |
task :my_task, :roles => [:web, :app] do | |
run <<-CMD | |
ln -nfs #{shared_path}/config/database.yml #{current_path}/config/database.yml | |
CMD | |
end | |
end | |
after "custom:my_task" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment