Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Application name, used in deploy/#{stage}.rb
- set :application, "mystock"
- # Multistage settings
- # :deploy_to is set in deploy/#{stage}.rb
- set :default_stage, "staging"
- set(:stage_path) { "#{latest_release}/config/stages/#{stage}" }
- # SCM setup
- set :scm, :git
- set :repository, "git@mystock.com:mystock.git"
- set :branch, "deploy"
- # SCM extra options
- set :git_enable_submodules, true
- set :repository_cache, "cached-copy"
- set :deploy_via, :remote_cache
- # User options for the server
- set :runner, "rails"
- set :git_username, "rails"
- set :ssh_options, { :username => "rails" }
- # Roles
- server "mystock.com", :app, :web
- role :db, "mystock.com", :primary => true
- namespace :deploy do
- after 'deploy:setup', 'mystock:content:create_dirs'
- after 'deploy:update_code', 'mystock:content:symlink_dirs', 'mystock:stage:symlink_files'
- after 'deploy', 'sphinx:configure', 'sphinx:restart', 'sphinx:index'
- end
- # Overrides for Phusion Passenger
- namespace :deploy do
- desc "Restarting mod_rails with restart.txt"
- 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 mod_rails"
- task t, :roles => :app do ; end
- end
- end
Add Comment
Please, Sign In to add comment