ms_deploy 0.0.11 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,30 +4,16 @@ set :domain, ''
4
4
  set :deploy_domain, ''
5
5
  set :vhost_domain, ''
6
6
 
7
- set :user, 'deploy'
8
- set :group, 'deploy'
9
-
10
- set :ruby_version, "ruby-1.9.3.rc1"
11
7
  set :rails_root, File.expand_path('../../', __FILE__)
12
-
13
- set :default_environment, {
14
- 'PATH' => "/home/#{user}/.rbenv/shims:/home/#{user}/.rbenv/bin:$PATH"
15
- }
16
-
17
8
  set :rails_env, :production # use 'stage' to differ between stage environments
18
- set :keep_releases, 10 # default
19
- set :use_sudo, false
20
9
 
21
- server domain, :web, :app, :db, :primary => true
10
+ set :user, 'deploy'
22
11
 
23
- set :branch do
24
- ENV['BRANCH'] || 'xxx'
25
- end
12
+ server domain, :web, :app, :db, :primary => true
26
13
 
27
14
  # Multistage settings
28
15
  #set :stage_dir, File.dirname(__FILE__) + '/deploy/stages'
29
16
  #set :default_stage, "vagrant"
30
- #
31
17
  #require 'capistrano/ext/multistage'
32
18
 
33
19
  # database
@@ -35,72 +21,36 @@ set :db_name, ''
35
21
  set :db_user_name, ''
36
22
  set :db_user_password, ''
37
23
 
38
- set :scm, :git
39
- set :repository, '.git'
40
- set :git_enable_submodules, 1
41
-
42
- # set deployment strategy
43
- set :deploy_via, :remote_cache
44
- set :copy_exclude, %w(.git .svn .DS_Store test doc .gitkeep)
45
-
46
- # :forward_agent allows us to avoid using and distributing a deploy key.
47
- # On problems run 'ssh-add' locally
48
- # In your /etc/ssh/ssh_config or ~/.ssh/config you need to have ForwardAgent enabled for this to work.
49
- set :ssh_options, { :port => fetch(:ssh_port, 22), :forward_agent => true, :paranoid => true }
50
-
51
- default_run_options[:pty] = true
52
-
53
- # set application folder
54
- set(:deploy_to) { "/var/projects/#{application}/#{fetch(:stage, 'production')}" }
55
-
56
- require 'ms_deploy/recipes/nginx'
57
- require 'ms_deploy/recipes/bundler'
58
- require 'ms_deploy/recipes/deploy/symlink'
59
- require 'ms_deploy/recipes/deploy/unicorn'
60
- require 'ms_deploy/recipes/deploy/setup'
61
- require 'ms_deploy/recipes/deploy/assets'
62
-
63
- before 'deploy:setup', 'deploy:prepare:database';
64
- after 'deploy:update", "deploy:cleanup'
24
+ set :branch, ENV['BRANCH'] || 'develop'
25
+ set :repository, 'xxx.git'
65
26
 
66
27
  set(:shared_directories_to_create) {
67
- [
68
- "#{shared_path}/vendor/bundle",
69
- "#{shared_path}/vendor/cache",
70
- "#{shared_path}/uploads"
71
- ]
28
+ %W(#{shared_path}/bundle #{shared_path}/cache)
72
29
  }
73
30
 
74
31
  set(:shared_directories_to_link) {
75
32
  {
76
- "#{shared_path}/bundle/" => "#{release_path}/vendor/bundle"
33
+ "#{shared_path}/bundle/" => "#{release_path}/vendor/bundle"
77
34
  }
78
35
  }
79
36
 
80
37
  set(:directories_to_create) {
81
- [
82
- "#{release_path}/tmp",
83
- "#{release_path}/vendor"
84
- ]
38
+ %W()
85
39
  }
86
40
 
87
41
  set(:files_to_link) {
88
42
  {
89
- "#{shared_path}/config/config.#{stage}.yml" => "#{release_path}/config/config.local.yml",
90
- "#{shared_path}/config/unicorn.#{stage}.rb" => "#{release_path}/config/unicorn.production.rb"
43
+ "#{shared_path}/config/config.#{stage}.yml" => "#{release_path}/config/config.local.yml",
44
+ "#{shared_path}/config/unicorn.#{stage}.rb" => "#{release_path}/config/unicorn.production.rb"
91
45
  }
92
46
  }
93
47
 
94
48
  set(:config_file_to_setup) {
95
- [
96
- "config.#{stage}.yml",
97
- "unicorn.#{stage}.rb"
98
- ]
49
+ %W(config.#{stage}.yml unicorn.#{stage}.rb)
99
50
  }
100
51
 
101
52
  set(:files_to_delete) {
102
- [
103
- ]
53
+ %W()
104
54
  }
105
55
 
106
56
  set(:chmods_to_set) {
@@ -108,3 +58,17 @@ set(:chmods_to_set) {
108
58
  # "#{shared_path}/data/pdf" => 755
109
59
  }
110
60
  }
61
+
62
+ require 'ms_deploy/recipes/defaults'
63
+
64
+ require 'ms_deploy/recipes/rbenv'
65
+ require 'ms_deploy/recipes/assets'
66
+ require 'ms_deploy/recipes/nginx'
67
+ require 'ms_deploy/recipes/bundler'
68
+ require 'ms_deploy/recipes/symlink'
69
+ require 'ms_deploy/recipes/unicorn'
70
+ require 'ms_deploy/recipes/setup'
71
+ require 'ms_deploy/recipes/monitoring'
72
+ require 'ms_deploy/recipes/seeding'
73
+ #require 'ms_deploy/recipes/paperclip'
74
+ #require 'ms_deploy/recipes/airbrake'
@@ -0,0 +1,4 @@
1
+ Capistrano::Configuration.instance.load do
2
+ require './config/boot'
3
+ require 'airbrake/capistrano'
4
+ end
@@ -0,0 +1,18 @@
1
+ Capistrano::Configuration.instance.load do
2
+
3
+ load 'deploy/assets' # http://guides.rubyonrails.org/asset_pipeline.html#in-production
4
+
5
+ # http://www.bencurtis.com/2011/12/skipping-asset-compilation-with-capistrano/
6
+ namespace :deploy do
7
+ namespace :assets do
8
+ #task :precompile, :roles => :web, :except => { :no_release => true } do
9
+ # from = source.next_revision(current_revision)
10
+ # if capture("cd #{latest_release} && #{source.local.log(from)} lib/assets/ vendor/assets/ app/assets/ | wc -l").to_i > 0
11
+ # run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
12
+ # else
13
+ # logger.info "Skipping asset pre-compilation because there were no asset changes"
14
+ # end
15
+ #end
16
+ end
17
+ end
18
+ end
@@ -1,26 +1,23 @@
1
1
  Capistrano::Configuration.instance.load do
2
2
 
3
3
  # defaults
4
- #set :bundle_gemfile, "Gemfile"
5
- #set :bundle_dir, File.join(fetch(:shared_path), 'bundle')
6
- #set :bundle_without, [:development, :test]
7
- #set :bundle_roles, #{role_default} # e.g. [:app, :batch]
8
-
9
- set :bundle_cmd, "/home/deploy/.rbenv/shims/bundle"
4
+ #_cset :bundle_gemfile, "Gemfile"
5
+ #_cset :bundle_dir, File.join(fetch(:shared_path), 'bundle')
6
+ #_cset :bundle_roles, #{role_default} # e.g. [:app, :batch]
7
+ _cset :bundle_cmd, "/home/deploy/.rbenv/shims/bundle"
8
+ _cset :bundle_without, [:development, :test, :deploy]
10
9
  # http://shapeshed.com/journal/using-rbenv-to-manage-rubies/
11
10
  # you can also apply a clever technique to allow you switch versions of ruby by pushing a new .rbenv-version file with capistrano. From version 1.1rc bundler allows you to specify a shebang for binstubs. To use this add the following to your capistrano recipe.
12
- set :bundle_flags, "--deployment --quiet --binstubs --shebang ruby-local-exec"
11
+ _cset :bundle_flags, "--deployment --quiet --binstubs --shebang ruby-local-exec"
12
+ _cset :rake, 'bundle exec rake'
13
13
 
14
14
  require 'bundler/capistrano'
15
15
 
16
- set :rake, 'bundle exec rake'
17
-
18
16
  namespace :bundler do
19
17
  task :install_gem do
20
18
  run "cd #{release_path} && gem install bundler --no-ri --no-rdoc"
21
19
  end
22
20
  end
23
21
 
24
- before "bundle:install", "bundler:install_gem"
25
-
22
+ #before "bundle:install", "bundler:install_gem"
26
23
  end
@@ -0,0 +1,81 @@
1
+ Capistrano::Configuration.instance.load do
2
+
3
+ abort "You must run this using 'bundle exec ...'" unless ENV['BUNDLE_BIN_PATH'] || ENV['BUNDLE_GEMFILE']
4
+ abort "You must set :user before using defaults" unless fetch(:user, nil)
5
+ abort "You must set :repository before using defaults" unless fetch(:repository, nil)
6
+ abort "You must set :branch before using defaults" unless fetch(:branch, nil)
7
+
8
+ set :uptodate_scm, :git
9
+ set :uptodate_branch, fetch(:branch)
10
+ #:uptodate_scm_bynary ('git') - path to SCM binary
11
+ #:uptodate_remote_repository ('origin') - remote repository
12
+ #:uptodate_time (60) - time in seconds for checking remote repository
13
+ #:uptodate_behaviour - (:confirm)
14
+ # :confirm - show outdated message and ask to confirm the further execution
15
+ # :abort - show outdated message and abort further execution
16
+ require 'capistrano/uptodate'
17
+
18
+ require 'capistrano_colors'
19
+ capistrano_color_matchers = [
20
+ { :match => /command finished/, :color => :hide, :prio => 10 },
21
+ { :match => /executing command/, :color => :blue, :prio => 10, :attribute => :underscore },
22
+ { :match => /^transaction: commit$/, :color => :magenta, :prio => 10, :attribute => :blink },
23
+ { :match => /git/, :color => :white, :prio => 20, :attribute => :reverse },
24
+ ]
25
+ colorize( capistrano_color_matchers )
26
+
27
+ #Dynamically skip Capistrano hooks example
28
+ # before 'deploy:update_code', 'db:dump' unless fetch(:skip_dump, false)
29
+ # $ cap staging deploy -S skip_dump=true
30
+
31
+ set :keep_releases, 10
32
+ set :use_sudo, false
33
+
34
+ set :group, user
35
+
36
+ set :scm, :git
37
+ set :git_enable_submodules, true
38
+
39
+ # set deployment strategy
40
+ set :deploy_via, :remote_cache
41
+ set :copy_exclude, %w(.git .svn .DS_Store test doc .gitkeep)
42
+ #set :repository_cache, "cached-copy" # defaults to :shared_path + 'cached-copy/'
43
+
44
+ # :forward_agent allows us to avoid using and distributing a deploy key.
45
+ # On problems run 'ssh-add' locally
46
+ # In your /etc/ssh/ssh_config or ~/.ssh/config you need to have ForwardAgent enabled for this to work.
47
+ set :ssh_options, {:port => fetch(:ssh_port, 22), :forward_agent => true, :paranoid => true}
48
+
49
+ default_run_options[:pty] = true
50
+
51
+ before 'deploy:setup', 'deploy:prepare:database';
52
+ after 'deploy:update', 'deploy:cleanup'
53
+
54
+ desc "Show currently deployed revision on server."
55
+ task :revisions, :roles => :app do
56
+ current, previous, latest = current_revision[0,7], previous_revision[0,7], real_revision[0,7]
57
+ puts "\n" << "-"*63
58
+ puts "===== Master Revision: \033[1;33m#{latest}\033[0m\n\n"
59
+ puts "===== [ \033[1;36m#{application.capitalize} - #{stage.capitalize}\033[0m ]"
60
+ puts "=== Deployed Revision: \033[1;32m#{current}\033[0m"
61
+ puts "=== Previous Revision: \033[1;32m#{previous}\033[0m\n\n"
62
+
63
+ # If deployed and master are the same, show the difference between the last 2 deployments.
64
+ base_label, new_label, base_rev, new_rev = latest != current ? \
65
+ ["deployed", "master", current, latest] : \
66
+ ["previous", "deployed", previous, current]
67
+
68
+ # Show difference between master and deployed revisions.
69
+ if (diff = `git log #{base_rev}..#{new_rev} --oneline`) != ""
70
+ # Colorize refs
71
+ diff.gsub!(/^([a-f0-9]+) /, "\033[1;32m\\1\033[0m - ")
72
+ diff = " " << diff.gsub("\n", "\n ") << "\n"
73
+ # Indent commit messages nicely, max 80 chars per line, line has to end with space.
74
+ diff = diff.split("\n").map{|l|l.scan(/.{1,120}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m,"\n"<<" "*14<<"\\1")}.join("\n")
75
+ puts "=== Difference between #{base_label} revision and #{new_label} revision:\n\n"
76
+ puts diff
77
+ end
78
+ end
79
+
80
+ after "deploy", "revisions"
81
+ end
@@ -0,0 +1,11 @@
1
+ Capistrano::Configuration.instance.load do
2
+
3
+ namespace :deploy do
4
+ desc "build missing paperclip styles"
5
+ task :build_missing_paperclip_styles, :roles => :app do
6
+ run "cd #{release_path}; RAILS_ENV=production bundle exec rake paperclip:refresh:missing_styles"
7
+ end
8
+ end
9
+
10
+ after("deploy:update_code", "deploy:build_missing_paperclip_styles")
11
+ end
@@ -1,12 +1,11 @@
1
1
  Capistrano::Configuration.instance.load do
2
2
 
3
- set :puma_binary, fetch(:puma_binary, "bundle exec puma")
4
- set :pumactl_binary, fetch(:pumactl_binary, "bundle exec pumactl")
5
- set :puma_state, fetch(:puma_state, "tmp/puma_state")
6
- set :puma_tcp_port, fetch(:puma_tcp_port, nil)
7
- set :puma_tcp_port, fetch(:puma_control_tcp_port, 9292)
8
- set :puma_control_tcp_port, fetch(:puma_control_tcp_port, puma_tcp_port.to_i + 1)
9
- set :puma_thread_pool, '0:16'
3
+ _cset :puma_binary, "bundle exec puma"
4
+ _cset :pumactl_binary, "bundle exec pumactl"
5
+ _cset :puma_state, "tmp/puma_state"
6
+ _cset :puma_tcp_port, 9292
7
+ _cset :puma_control_tcp_port, puma_tcp_port.to_i + 1
8
+ _cset :puma_thread_pool, '0:16'
10
9
 
11
10
  namespace :deploy do
12
11
  task :start, :roles => :app, :except => { :no_release => true } do
@@ -0,0 +1,7 @@
1
+ Capistrano::Configuration.instance.load do
2
+ abort "You must set :user before using defaults" unless fetch(:user)
3
+
4
+ set :default_environment, {
5
+ 'PATH' => "/home/#{user}/.rbenv/shims:/home/#{user}/.rbenv/bin:$PATH"
6
+ }
7
+ end
@@ -0,0 +1,8 @@
1
+ Capistrano::Configuration.instance.load do
2
+ abort "You must set :ruby_version before using defaults" unless fetch(:ruby_version)
3
+
4
+ #$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
5
+ require "rvm/capistrano"
6
+ set :rvm_ruby_string, fetch(:ruby_version)
7
+ set :rvm_type, :user
8
+ end
@@ -0,0 +1,9 @@
1
+ Capistrano::Configuration.instance.load do
2
+
3
+ namespace :deploy do
4
+ task :seed do
5
+ run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec rake db:seed"
6
+ end
7
+ end
8
+
9
+ end
@@ -15,11 +15,11 @@ Capistrano::Configuration.instance.load do
15
15
  end
16
16
 
17
17
  task :database do
18
- set :db_admin_user, 'root' unless fetch(:db_admin_user, nil)
19
- set :db_admin_password, Capistrano::CLI.password_prompt("Type your mysql password for user '#{db_admin_user}' (not set if empty): ") unless fetch(:db_admin_password, nil)
20
- set :db_name, application.gsub(/\W+/, '')[0..5] + '_' + rails_env.to_s unless fetch(:db_name, nil)
21
- set :db_user_name, application unless fetch(:db_user_name, nil)
22
- set :db_user_password, '' unless fetch(:db_user_password, nil)
18
+ _cset :db_admin_user, 'root'
19
+ _cset :db_admin_password, Capistrano::CLI.password_prompt("Type your mysql password for user '#{db_admin_user}' (not set if empty): ")
20
+ _cset :db_name, application.gsub(/\W+/, '')[0..5] + '_' + rails_env.to_s
21
+ _cset :db_user_name, application
22
+ _cset :db_user_password, ''
23
23
 
24
24
  unless db_admin_password.to_s.empty?
25
25
  unless database_exits?
@@ -0,0 +1,30 @@
1
+ Capistrano::Configuration.instance.load do
2
+
3
+ set :unicorn_bin, "bundle exec unicorn"
4
+ set :unicorn_config, "config/unicorn.#{fetch(:stage, 'production')}.rb"
5
+ set :unicorn_pid, "tmp/pids/unicorn.pid"
6
+
7
+ #require "capistrano-unicorn"
8
+
9
+ namespace :deploy do
10
+ desc 'Start unicorn'
11
+ task :start, :roles => :app, :except => {:no_release => true} do
12
+ run "cd #{current_path} && #{try_sudo} #{unicorn_bin} -c #{current_path}/#{unicorn_config} -E #{rails_env} -D"
13
+ end
14
+
15
+ desc 'Stop unicorn'
16
+ task :stop, :roles => :app, :except => {:no_release => true} do
17
+ run "if [ -f #{current_path}/#{unicorn_pid} ]; then #{try_sudo} kill -QUIT `cat #{current_path}/#{unicorn_pid}`; fi"
18
+ end
19
+
20
+ desc 'Restart unicorn'
21
+ task :restart, :roles => :app, :except => {:no_release => true} do
22
+ run "cd #{current_path} && #{try_sudo} kill -HUP `cat #{current_path}/#{unicorn_pid}`"
23
+ end
24
+
25
+ desc 'Reexecute unicorn'
26
+ task :reexec, :roles => :app, :except => {:no_release => true} do
27
+ run "cd #{current_path} && kill -USR2 `cat #{current_path}/#{unicorn_pid}`"
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module MsDeploy
2
- VERSION = "0.0.11"
2
+ VERSION = "0.1.1"
3
3
  end
data/ms_deploy.gemspec CHANGED
@@ -14,8 +14,13 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "ms_deploy"
15
15
  gem.require_paths = ["lib"]
16
16
 
17
- gem.add_dependency('capistrano')
18
- gem.add_dependency('capistrano-ext')
17
+ gem.add_dependency('capistrano', '>= 2.12.0')
18
+ gem.add_dependency('capistrano-ext', '>= 1.2.1')
19
+ gem.add_dependency('capistrano_colors', '>= 0.5.5')
20
+ gem.add_dependency('capistrano-unicorn', '>= 0.1.6')
21
+ gem.add_dependency('capistrano-file_db', '>= 0.1.0')
22
+ gem.add_dependency('capistrano-uptodate', '>= 0.0.2')
23
+ gem.add_dependency('rvm-capistrano', '>= 1.2.2')
19
24
  gem.add_dependency('erubis')
20
25
 
21
26
  gem.version = MsDeploy::VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ms_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,33 +9,88 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-01 00:00:00.000000000 Z
12
+ date: 2012-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &89146810 !ruby/object:Gem::Requirement
16
+ requirement: &83071140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 2.12.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *89146810
24
+ version_requirements: *83071140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: capistrano-ext
27
- requirement: &89146600 !ruby/object:Gem::Requirement
27
+ requirement: &83070650 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
- version: '0'
32
+ version: 1.2.1
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *83070650
36
+ - !ruby/object:Gem::Dependency
37
+ name: capistrano_colors
38
+ requirement: &83070190 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 0.5.5
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *83070190
47
+ - !ruby/object:Gem::Dependency
48
+ name: capistrano-unicorn
49
+ requirement: &83069790 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.1.6
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *83069790
58
+ - !ruby/object:Gem::Dependency
59
+ name: capistrano-file_db
60
+ requirement: &83069310 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: 0.1.0
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *83069310
69
+ - !ruby/object:Gem::Dependency
70
+ name: capistrano-uptodate
71
+ requirement: &83068840 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: 0.0.2
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *83068840
80
+ - !ruby/object:Gem::Dependency
81
+ name: rvm-capistrano
82
+ requirement: &83068290 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: 1.2.2
33
88
  type: :runtime
34
89
  prerelease: false
35
- version_requirements: *89146600
90
+ version_requirements: *83068290
36
91
  - !ruby/object:Gem::Dependency
37
92
  name: erubis
38
- requirement: &89146390 !ruby/object:Gem::Requirement
93
+ requirement: &83067760 !ruby/object:Gem::Requirement
39
94
  none: false
40
95
  requirements:
41
96
  - - ! '>='
@@ -43,7 +98,7 @@ dependencies:
43
98
  version: '0'
44
99
  type: :runtime
45
100
  prerelease: false
46
- version_requirements: *89146390
101
+ version_requirements: *83067760
47
102
  description: capistrano deployment task for my projects
48
103
  email:
49
104
  - michael.schiller@gmx.de
@@ -57,16 +112,22 @@ files:
57
112
  - Rakefile
58
113
  - lib/examples/deploy.rb
59
114
  - lib/ms_deploy.rb
115
+ - lib/ms_deploy/recipes/airbrake.rb
116
+ - lib/ms_deploy/recipes/assets.rb
60
117
  - lib/ms_deploy/recipes/bundler.rb
61
- - lib/ms_deploy/recipes/deploy/assets.rb
62
- - lib/ms_deploy/recipes/deploy/puma.rb
63
- - lib/ms_deploy/recipes/deploy/setup.rb
64
- - lib/ms_deploy/recipes/deploy/symlink.rb
65
- - lib/ms_deploy/recipes/deploy/unicorn.rb
118
+ - lib/ms_deploy/recipes/defaults.rb
66
119
  - lib/ms_deploy/recipes/info.rb
67
120
  - lib/ms_deploy/recipes/monitoring.rb
68
121
  - lib/ms_deploy/recipes/nginx.rb
122
+ - lib/ms_deploy/recipes/paperclip.rb
123
+ - lib/ms_deploy/recipes/puma.rb
124
+ - lib/ms_deploy/recipes/rbenv.rb
69
125
  - lib/ms_deploy/recipes/redis.rb
126
+ - lib/ms_deploy/recipes/rvm.rb
127
+ - lib/ms_deploy/recipes/seeding.rb
128
+ - lib/ms_deploy/recipes/setup.rb
129
+ - lib/ms_deploy/recipes/symlink.rb
130
+ - lib/ms_deploy/recipes/unicorn.rb
70
131
  - lib/ms_deploy/recipes/whenever.rb
71
132
  - lib/ms_deploy/render.rb
72
133
  - lib/ms_deploy/templates/vhost.erb
@@ -1,15 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
- # http://www.bencurtis.com/2011/12/skipping-asset-compilation-with-capistrano/
3
- namespace :deploy do
4
- namespace :assets do
5
- task :precompile, :roles => :web, :except => { :no_release => true } do
6
- from = source.next_revision(current_revision)
7
- if capture("cd #{latest_release} && #{source.local.log(from)} lib/assets/ vendor/assets/ app/assets/ | wc -l").to_i > 0
8
- run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
9
- else
10
- logger.info "Skipping asset pre-compilation because there were no asset changes"
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,23 +0,0 @@
1
- Capistrano::Configuration.instance.load do
2
-
3
- set :unicorn_binary, "bundle exec unicorn"
4
- set :unicorn_config, "config/unicorn.#{fetch(:stage, 'production')}.rb"
5
- set :unicorn_pid, "tmp/pids/unicorn.pid"
6
-
7
- namespace :deploy do
8
- task :start, :roles => :app, :except => { :no_release => true } do
9
- run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{current_path}/#{unicorn_config} -E #{rails_env} -D"
10
- end
11
- task :stop, :roles => :app, :except => { :no_release => true } do
12
- run "if [ -f #{current_path}/#{unicorn_pid} ]; then #{try_sudo} kill `cat #{current_path}/#{unicorn_pid}`; fi"
13
- end
14
- task :graceful_stop, :roles => :app, :except => { :no_release => true } do
15
- run "#{try_sudo} kill -s QUIT `cat #{unicorn_pid}`"
16
- end
17
- task :restart, :roles => :app, :except => { :no_release => true } do
18
- stop
19
- start
20
- end
21
- end
22
-
23
- end