Sha256: ddeb20ad789849459fdd4a6eab0b89ba97d6ad68e36d1cbda6e6b136f884e33b
Contents?: true
Size: 908 Bytes
Versions: 1
Compression:
Stored size: 908 Bytes
Contents
namespace :load do task :defaults do set :owned_by_user, 'app' set :owned_by_group, 'deploy' set :release_paths_to_be_owned_by_app, '.' set :shared_paths_to_be_owned_by_app, '.' end end # For our rails applications, the actual ruby code is run # by a different user than our deploy user. We want to make sure the directory # permissions are set appropriately namespace :deploy do task :set_app_ownership do on release_roles(:all) do within release_path do paths = Array(fetch(:release_paths_to_be_owned_by_app)).join(' ') sudo "chown -R #{fetch(:owned_by_user)}:#{fetch(:owned_by_group)} #{paths}" end end on release_roles(:all) do within shared_path do paths = Array(fetch(:shared_paths_to_be_owned_by_app)).join(' ') sudo "chown -R #{fetch(:owned_by_user)}:#{fetch(:owned_by_group)} #{paths}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
elocal_capistrano-2.3.3 | lib/tasks/deploy.rake |