Updated deploy-sample.rb to link the secret_token.rb file on deployment
[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 set :branch, 'master'
6
7 set :default_stage, 'production'
8
9 set :deploy_to, '/var/www/my_app'
10 set :scm, :git
11
12 set :format, :pretty
13 # set :log_level, :debug
14 # set :pty, true
15
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}
18
19 set :default_env, { path: "/opt/ruby/bin:$PATH" }
20 set :keep_releases, 5
21
22 namespace :deploy do
23
24 desc 'Restart application'
25 task :restart do
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')
29 end
30 end
31
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'
37 # end
38 end
39 end
40
41 after :finishing, 'deploy:cleanup'
42
43 end