aboutsummaryrefslogtreecommitdiffstats
path: root/config/deploy.rb.example
blob: f08e859b89c5485fc619f3c16144342c111784a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
lock '3.2.1'

# change this to your application name
set :application, 'hmno'

# change this to your fork
set :repo_url, 'git@github.com:snake66/project-limestone.git'

set :linked_files, %w{config/initializers/refinery/core.rb config/initializers/secret_token.rb}
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

namespace :deploy do

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      # Touching this file forces the server to reload
      # the application
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  after :publishing, :restart

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
      # Here we can do anything such as:
      # within release_path do
      #   execute :rake, 'cache:clear'
      # end
    end
  end

end