Initial capification
[feedcatcher.git] / config / deploy-sample.rb
diff --git a/config/deploy-sample.rb b/config/deploy-sample.rb
new file mode 100644 (file)
index 0000000..a1b6fd1
--- /dev/null
@@ -0,0 +1,40 @@
+set :application, 'my_app_name'
+set :repo_url, 'git@example.com:me/my_repo.git'
+
+# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
+
+# set :deploy_to, '/var/www/my_app'
+# set :scm, :git
+
+# set :format, :pretty
+# set :log_level, :debug
+# set :pty, true
+
+# set :linked_files, %w{config/database.yml}
+# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
+
+# set :default_env, { path: "/opt/ruby/bin:$PATH" }
+# set :keep_releases, 5
+
+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 release_path do
+      #   execute :rake, 'cache:clear'
+      # end
+    end
+  end
+
+  after :finishing, 'deploy:cleanup'
+
+end