Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set :application, "alice"
- set :deploy_to, "~/#{application}"
- set :scm, :git
- set :repository, "git@github.com:grays/accounting.app.git"
- set :git_enable_submodules, true
- set :deploy_via, :remote_cache
- role :app, "alice"
- role :web, "alice"
- role :db, "alice", :primary => true
- ssh_options[:username] = "deploy"
- ssh_options[:forward_agent] = true
- set :run_method, :run
- namespace :deploy do
- task :custom_symlinks do
- run "ln -nfs #{shared_path}/system/database.yml #{release_path}/config/database.yml"
- end
- desc "Restart Passenger"
- task :restart, :roles => :app, :except => { :no_release => true } do
- run "touch #{current_path}/tmp/restart.txt"
- end
- [:start, :stop].each do |t|
- desc "#{t} task is a no-op with Passenger"
- task t, :roles => :app do ; end
- end
- desc "Update the crontab file"
- task :update_crontab, :roles => :db do
- run "cd #{release_path} && whenever --update-crontab #{application}"
- end
- end
- after "deploy:symlink", "deploy:custom_symlinks", "deploy:update_crontab"
- after "deploy", "deploy:cleanup"
Add Comment
Please, Sign In to add comment