Sha256: 9ad1f6ab8651e770c2433a85988081a4e52d9d2b2b272f660b134c3f5af4ddd1

Contents?: true

Size: 1.28 KB

Versions: 16

Compression:

Stored size: 1.28 KB

Contents

require File.expand_path('../yum', __FILE__)

#
# Capistrano recipes for cold deployments
#
# Usage (add the following to your deploy.rb):
#
#    load 'recipes/stack'
#    set :gems_for_project, ""
#    ...
#
#    Then just run "cap deploy:cold" and this stack will hook into it
#

namespace :stack do

  # Override this if you don't want particular stack items
  desc "Setup operating system and rails environment"
  task :default do
    yum.update
    yum.install( {:base => packages_for_project}, :stable ) if packages_for_project
    
    gems

    deploy.setup
    shared.setup
  end

  desc "Install required gems"
  task :gems do
    run "gem install #{gems_for_project} --no-rdoc --no-ri"
  end

end

namespace 'shared' do

  desc "Setup shared directory"
  task :setup do
    sudo "mkdir -p #{deploy_to}/shared/config"
  end

  desc "Setting proper permissions on shared directory"
  task :permissions do
    run "chown -R apache:apache #{deploy_to}/shared/"
    #~ run "chmod -R 755 #{deploy_to}/shared/"
    # during deployments
    run "if [ -d #{release_path}/ ]; then chown -R apache:apache #{release_path}/; fi"
    run "if [ -d #{release_path}/ ]; then chmod -R 755 #{release_path}/; fi"
  end

end

#
# Hooks
#
before "deploy:cold",        "stack"
before "deploy:symlink",     "shared:permissions"

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
crossroads_capistrano-1.3.61 lib/crossroads_capistrano/recipes/stack.rb
crossroads_capistrano-1.3.60 lib/crossroads_capistrano/recipes/stack.rb
crossroads_capistrano-1.3.4 lib/crossroads_capistrano/recipes/stack.rb
crossroads_capistrano-1.3.3 lib/crossroads_capistrano/recipes/stack.rb
crossroads_capistrano-1.3.2 lib/crossroads_capistrano/recipes/stack.rb
crossroads_capistrano-1.3.0 lib/crossroads_capistrano/recipes/stack.rb
crossroads_capistrano-1.2.9 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.8 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.7 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.6 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.5 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.4 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.3 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.2 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.1 lib/crossroads_capistrano/stack.rb
crossroads_capistrano-1.2.0 lib/crossroads_capistrano/stack.rb