Sha256: ca685b125432ca77d3bae82e890e0052d8b6c4124c4e4cfac96ed049ae107172

Contents?: true

Size: 1.79 KB

Versions: 6

Compression:

Stored size: 1.79 KB

Contents

default_run_options[:pty] = true
default_run_options[:shell] = '/bin/bash --login'

set :application, "" # The name of the application
set :repository,  "git@github.com:factore/#{application}.git" # Path to the github repo
# set :repository,  "git@bitbucket.org:factore/#{application}.git" # Path to the bitbucket repo

set :scm, "git"
set :scm_passphrase, "9shwartz90005"
set :user, "deploy"
set :deploy_via, :remote_cache
set :bundle_without, [:darwin, :development, :test, :linux]

set :deploy_to, "/var/apps/#{application}"

role :web, "metal1.factore.ca", "metal2.factore.ca"
role :db, "metal1.factore.ca", :primary => true

before("deploy:assets:precompile") { run "cd #{current_release}; cp config/database.yml.template config/database.yml" }
# Uncomment this line if the app uses ferret_server
# after("deploy:symlink") { run "chmod +rx #{current_path}/script/ferret_server" }
after("deploy:restart", "deploy:expire_cache")

# Clean up!
set :use_sudo, false
set :keep_releases, 2
after "deploy", "deploy:cleanup"
after "deploy:migrate", "deploy:cleanup"


# Passenger Stuff and Cache Expiry
namespace :deploy do
  desc "Restarting mod_rails with restart.txt"
  task :restart, :roles => :web, :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 => :web do ; end
  end

  desc "Expire the cache"
  task :expire_cache, :roles => :db do
    run "cd /var/apps/#{application}/current; bundle exec rake forge:expire_cache RAILS_ENV=production;"
  end

  desc "Deploy Forge"
  task :deploy_forge, :roles => :db do
    run "cd #{current_release}; bundle exec rake forge:deploy RAILS_ENV=production PASSWORD=#{ENV['PASSWORD']}; bundle exec rake forge:load_help RAILS_ENV=production"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
forge-cli-0.1.8 lib/forge/config/deploy.rb
forge-cli-0.1.5 lib/forge/config/deploy.rb
forge-cli-0.1.4 lib/forge/config/deploy.rb
forge-cli-0.1.3 lib/forge/config/deploy.rb
forge-cli-0.1.2 lib/forge/config/deploy.rb
forge-cli-0.1.1 lib/forge/config/deploy.rb