Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Application
- set :application, "MYAPP"
- set :deploy_to, "/var/www/#{application}"
- ## Settings
- default_run_options[:pty] = true
- set :use_sudo, false
- ## Servers
- set :domain, "DEPLOYSERVER"
- server domain, :app, :web, :db, :primary => true
- ## Repository
- set :scm, :git
- set :repository, "git@GITSERVER:MYAPP.git"
- set :branch, "master"
- set :deploy_via, :remote_cache
- ## SSH
- set :user, "deploy"
- set :ssh_options, { :forward_agent => true }
- ## Passenger commands
- namespace :deploy do
- desc "Restarting #{application}..."
- task :restart, :roles => :app, :except => { :no_release => true } do
- run "touch #{release_path}/tmp/restart.txt"
- end
- [:start, :stop].each do |t|
- desc "#{t} task is a no-op with passenger (mod_rails)"
- task t, :roles => :app do ; end
- end
- end
- on :start do
- `ssh-add`
- end
- ## Update server config files
- task :update_config, :roles => [:app] do
- run "cp -Rf #{shared_path}/config/* #{release_path}/config/"
- end
- after "deploy:update_code", :update_config
Add Comment
Please, Sign In to add comment