diff options
| author | mo khan <mo@mokhan.ca> | 2014-08-22 21:18:50 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-08-22 21:18:50 -0600 |
| commit | 862f2cb16a498bd284d0ab8feea320adef7b0c2e (patch) | |
| tree | f59ed9ca1ea827a789a8a77c70cbed07ed1de163 /config/deploy.rb | |
| parent | dc568f8d66f579384778188417b356443c430c44 (diff) | |
move old cap to old_cap folder.
Diffstat (limited to 'config/deploy.rb')
| -rw-r--r-- | config/deploy.rb | 96 |
1 files changed, 58 insertions, 38 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 679e2c36..b12c1346 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,38 +1,58 @@ -require 'bundler/capistrano' -require 'dotenv/deployment/capistrano' - -load "config/recipes/environments" -load "config/recipes/base" -load "config/recipes/nginx" -load "config/recipes/unicorn" -load "config/recipes/postgresql" -load "config/recipes/delayed_job" -load "config/recipes/monit" -load "config/tasks/utility" -load "config/tasks/rails" - -set :application, "cakeside" -set :user, "deployer" -set :use_sudo, false -default_run_options[:pty] = true # password prompt - -# git -set :scm, :git -set :scm_verbose, true -set :repository, "git@bitbucket.org:cakeside/cakeside.git" -set :branch, "master" -set :deploy_via, :remote_cache - -#copy -#set :scm, :none -#set :repository, "." -#set :deploy_via, :copy - -set :deploy_to, "/home/#{user}/apps/#{application}" -set :keep_releases, 3 -set :normalize_asset_timestamps, false -set :ssh_options, {:forward_agent => true} - -after "deploy", "deploy:cleanup" # remove old releases - -require './config/boot' +# config valid only for Capistrano 3.1 +lock '3.2.1' + +set :application, 'cakeside' +set :repo_url, 'git@bitbucket.org:cakeside/cakeside.git' + +# Default branch is :master +# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call + +# Default deploy_to directory is /var/www/my_app +# set :deploy_to, '/var/www/my_app' + +# Default value for :scm is :git +# set :scm, :git + +# Default value for :format is :pretty +# set :format, :pretty + +# Default value for :log_level is :debug +# set :log_level, :debug + +# Default value for :pty is false +# set :pty, true + +# Default value for :linked_files is [] +# set :linked_files, %w{config/database.yml} + +# Default value for linked_dirs is [] +# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system} + +# Default value for default_env is {} +# set :default_env, { path: "/opt/ruby/bin:$PATH" } + +# Default value for keep_releases is 5 +# 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 :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 |
