a1b6fd1a92a482aba6cd3760362563a676a2db00
[feedcatcher.git] / config / deploy-sample.rb
1 set :application, 'my_app_name'
2 set :repo_url, 'git@example.com:me/my_repo.git'
3
4 # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
5
6 # set :deploy_to, '/var/www/my_app'
7 # set :scm, :git
8
9 # set :format, :pretty
10 # set :log_level, :debug
11 # set :pty, true
12
13 # set :linked_files, %w{config/database.yml}
14 # set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
15
16 # set :default_env, { path: "/opt/ruby/bin:$PATH" }
17 # set :keep_releases, 5
18
19 namespace :deploy do
20
21 desc 'Restart application'
22 task :restart do
23 on roles(:app), in: :sequence, wait: 5 do
24 # Your restart mechanism here, for example:
25 # execute :touch, release_path.join('tmp/restart.txt')
26 end
27 end
28
29 after :restart, :clear_cache do
30 on roles(:web), in: :groups, limit: 3, wait: 10 do
31 # Here we can do anything such as:
32 # within release_path do
33 # execute :rake, 'cache:clear'
34 # end
35 end
36 end
37
38 after :finishing, 'deploy:cleanup'
39
40 end