1 set
:application, 'my_app_name'
2 set
:repo_url, 'git@example.com:me/my_repo.git'
4 # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
7 set
:default_stage, 'production'
9 set
:deploy_to, '/var/www/my_app'
13 # set :log_level, :debug
16 set
:linked_files, %w
{config
/database.yml config/initializers
/secret_token
.rb
}
17 set
:linked_dirs, %w
{bin log tmp
/pids tmp/cache tmp
/sockets vendor/bundle public
/system
}
19 set
:default_env, { path
: "/opt/ruby/bin:$PATH" }
24 desc
'Restart application'
26 on
roles(:app), in: :sequence, wait
: 5 do
27 # Your restart mechanism here, for example:
28 execute
:touch, release_path
.join('tmp/restart.txt')
32 after
:restart, :clear_cache do
33 on
roles(:web), in: :groups, limit
: 3, wait
: 10 do
34 # Here we can do anything such as:
35 # within release_path do
36 # execute :rake, 'cache:clear'
41 after
:finishing, 'deploy:cleanup'