Sha256: 3448f09cbad8f01412d1cf819949e020607d1a6c5218fc399b734d30fc09084f
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 KB
Contents
# Load DSL and Setup Up Stages require 'capistrano/setup' # Includes default deployment tasks require 'capistrano/deploy' # Includes tasks from other gems included in your Gemfile # # For documentation on these, see for example: # # https://github.com/capistrano/rvm # https://github.com/capistrano/rbenv # https://github.com/capistrano/bundler # https://github.com/capistrano/rails/tree/master/assets # https://github.com/capistrano/rails/tree/master/migrations # # require 'capistrano/rvm' # require 'capistrano/rbenv' # require 'capistrano/bundler' # require 'capistrano/rails/assets' # require 'capistrano/rails/migrations' # Loads custom tasks from `lib/capistrano/tasks' if you have any defined. Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } namespace :deploy do desc 'Restart application' task :restart do on roles(:app), in: :sequence, wait: 5 do # Your restart mechanism here, for example: # execute :touch, release_path.join('tmp/restart.txt') end end after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do # Here we can do anything such as: # within latest_release_path do # execute :rake, 'cache:clear' # end end end after :finishing, 'deploy:cleanup' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-3.0.0.pre14 | lib/capistrano/templates/Capfile |