Sha256: c4f98f60dd1afc8200ab14d04b85f81b42a3fbdc99c9273bc71c94f017274c3b

Contents?: true

Size: 861 Bytes

Versions: 7

Compression:

Stored size: 861 Bytes

Contents

set :backup_dirs, []

namespace :deploy do

  %w(start stop restart).each do |action|
    desc "#{action.capitalize} application"
    task :"#{action}" do
      on roles(:app) do
        execute "service #{fetch :application} #{action}"
      end
    end
  end

  after :publishing, :restart
end


namespace :db do
  desc 'First DDBB setup'
  task :setup do
    on roles(:all) do
      within release_path do
        with rails_env: fetch(:stage) do
          execute :rake, 'db:schema:load'
          execute :rake, 'db:seed'
        end
      end
    end
  end
end

namespace :git do
  desc 'Git pull for common code project'
  task :pull_common do
    on roles(:app) do
      within "/var/www/common" do
        execute :git, :pull, :origin, :master
      end if test("[ -d /var/www/common ]")
    end
  end

  after "deploy:updating", "git:pull_common"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
prun-ops-0.0.17 lib/capistrano/all.rake
prun-ops-0.0.16 lib/capistrano/all.rake
prun-ops-0.0.15 lib/capistrano/all.rake
prun-ops-0.0.14 lib/capistrano/all.rake
prun-ops-0.0.13 lib/capistrano/all.rake
prun-ops-0.0.12 lib/capistrano/all.rake
prun-ops-0.0.11 lib/capistrano/all.rake