- default_run_options[:pty] = true
- set :scm, :git
- set :scm_verbose, true
- # Multistage settings
- # :deploy_to is set in deploy/#{stage}.rb
- set :stages, %w(staging production)
- set :default_stage, "staging"
- set(:stage_path) { "#{latest_release}/config/stages/#{stage}" }
- require 'capistrano/ext/multistage'
- set :user, 'deployer'
- set :runner, 'deployer'
- set :application, "alabama-beach-pool"
- set :repository, "git@github.com:isotope11/alabama-beach-pool.git"
- set :repository_cache, "cached-copy"
- set :deploy_via, :remote_cache
- # If you aren't deploying to /u/apps/#{application} on the target
- # servers (which is the default), you can specify the actual location
- # via the :deploy_to variable:
- set :deploy_to, "/home/deploy/#{application}"
- role :app, "50.57.148.105"
- role :web, "50.57.148.105"
- role :db, "50.57.148.105", :primary => true
- task :sym_public_files do
- %w{ address_files uploads file_section_file residential_insurance_application nacha_batch}.each do |dir|
- run "ln -s #{deploy_to}/shared/#{dir} #{deploy_to}/current/public/#{dir}"
- end
- end
- desc "Starts Memcache"
- task :start_memcache do
- run "cd #{latest_release} && RAILS_ENV=production rake memcache:start"
- end
- namespace :deploy do
- after 'deploy:setup', 'alabama-beach-pool:content:create_dirs'
- after 'deploy:restart', 'sym_public_files'
- #before 'deploy:start', 'start_memcache'
- #before 'deploy:restart', 'start_memcache'
- #after 'deploy:update_code', 'sass'
- end
- desc "Update Sass stylesheets"
- task :sass do
- run "cd #{latest_release} && ruby -rconfig/environment -e 'Sass::Plugin.update_stylesheets'"
- end
- 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
- #Dir[File.join(File.dirname(__FILE__), '..', 'vendor', 'gems', 'hoptoad_notifier-*')].each do |vendored_notifier|
- # $: << File.join(vendored_notifier, 'lib')
- #end
- #
- #require 'hoptoad_notifier/capistrano'