Deploy script
This commit is contained in:
6
Capfile
6
Capfile
@@ -23,9 +23,13 @@ require 'capistrano/rails/assets'
|
|||||||
# require 'capistrano/rails/migrations'
|
# require 'capistrano/rails/migrations'
|
||||||
require 'capistrano/passenger'
|
require 'capistrano/passenger'
|
||||||
# require 'capistrano/sidekiq'
|
# require 'capistrano/sidekiq'
|
||||||
require 'capistrano/git-submodule-strategy'
|
|
||||||
# require "whenever/capistrano" # Update crontab on deploy
|
# require "whenever/capistrano" # Update crontab on deploy
|
||||||
|
|
||||||
|
require "capistrano/scm/git"
|
||||||
|
install_plugin Capistrano::SCM::Git
|
||||||
|
require "capistrano/scm/git-with-submodules"
|
||||||
|
install_plugin Capistrano::SCM::Git::WithSubmodules
|
||||||
|
|
||||||
|
|
||||||
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
||||||
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
||||||
|
|||||||
2
Gemfile
2
Gemfile
@@ -44,5 +44,5 @@ group :development, :test do
|
|||||||
gem 'capistrano-rails'
|
gem 'capistrano-rails'
|
||||||
gem 'capistrano-rvm'
|
gem 'capistrano-rvm'
|
||||||
gem 'capistrano-sidekiq'
|
gem 'capistrano-sidekiq'
|
||||||
gem 'capistrano-git-submodule-strategy', '~> 0.1.22'
|
gem 'capistrano-git-with-submodules', '~> 2.0'
|
||||||
end
|
end
|
||||||
|
|||||||
23
Gemfile.lock
23
Gemfile.lock
@@ -38,7 +38,7 @@ GEM
|
|||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
airbrussh (1.1.1)
|
airbrussh (1.3.0)
|
||||||
sshkit (>= 1.6.1, != 1.7.0)
|
sshkit (>= 1.6.1, != 1.7.0)
|
||||||
arel (7.1.4)
|
arel (7.1.4)
|
||||||
binding_of_caller (0.7.2)
|
binding_of_caller (0.7.2)
|
||||||
@@ -46,18 +46,16 @@ GEM
|
|||||||
bower-rails (0.10.0)
|
bower-rails (0.10.0)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
byebug (9.0.6)
|
byebug (9.0.6)
|
||||||
capistrano (3.6.1)
|
capistrano (3.10.1)
|
||||||
airbrussh (>= 1.0.0)
|
airbrussh (>= 1.0.0)
|
||||||
capistrano-harrow
|
|
||||||
i18n
|
i18n
|
||||||
rake (>= 10.0.0)
|
rake (>= 10.0.0)
|
||||||
sshkit (>= 1.9.0)
|
sshkit (>= 1.9.0)
|
||||||
capistrano-bundler (1.2.0)
|
capistrano-bundler (1.2.0)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
sshkit (~> 1.2)
|
sshkit (~> 1.2)
|
||||||
capistrano-git-submodule-strategy (0.1.22)
|
capistrano-git-with-submodules (2.0.3)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.7)
|
||||||
capistrano-harrow (0.5.3)
|
|
||||||
capistrano-passenger (0.2.0)
|
capistrano-passenger (0.2.0)
|
||||||
capistrano (~> 3.0)
|
capistrano (~> 3.0)
|
||||||
capistrano-rails (1.2.0)
|
capistrano-rails (1.2.0)
|
||||||
@@ -82,7 +80,8 @@ GEM
|
|||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
haml (4.0.7)
|
haml (4.0.7)
|
||||||
tilt
|
tilt
|
||||||
i18n (0.7.0)
|
i18n (0.9.3)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
json (1.8.3)
|
json (1.8.3)
|
||||||
loofah (2.0.3)
|
loofah (2.0.3)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
@@ -96,7 +95,7 @@ GEM
|
|||||||
minitest (5.9.1)
|
minitest (5.9.1)
|
||||||
net-scp (1.2.1)
|
net-scp (1.2.1)
|
||||||
net-ssh (>= 2.6.5)
|
net-ssh (>= 2.6.5)
|
||||||
net-ssh (3.2.0)
|
net-ssh (4.2.0)
|
||||||
nio4r (1.2.1)
|
nio4r (1.2.1)
|
||||||
nokogiri (1.6.8.1)
|
nokogiri (1.6.8.1)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
@@ -132,7 +131,7 @@ GEM
|
|||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (11.3.0)
|
rake (12.3.0)
|
||||||
rdoc (4.3.0)
|
rdoc (4.3.0)
|
||||||
redis (3.3.2)
|
redis (3.3.2)
|
||||||
responders (2.3.0)
|
responders (2.3.0)
|
||||||
@@ -157,7 +156,7 @@ GEM
|
|||||||
actionpack (>= 4.0)
|
actionpack (>= 4.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sshkit (1.11.4)
|
sshkit (1.15.1)
|
||||||
net-scp (>= 1.1.2)
|
net-scp (>= 1.1.2)
|
||||||
net-ssh (>= 2.8.0)
|
net-ssh (>= 2.8.0)
|
||||||
thor (0.19.4)
|
thor (0.19.4)
|
||||||
@@ -185,7 +184,7 @@ DEPENDENCIES
|
|||||||
byebug
|
byebug
|
||||||
capistrano
|
capistrano
|
||||||
capistrano-bundler
|
capistrano-bundler
|
||||||
capistrano-git-submodule-strategy (~> 0.1.22)
|
capistrano-git-with-submodules (~> 2.0)
|
||||||
capistrano-passenger (>= 0.2.0)
|
capistrano-passenger (>= 0.2.0)
|
||||||
capistrano-rails
|
capistrano-rails
|
||||||
capistrano-rvm
|
capistrano-rvm
|
||||||
@@ -205,4 +204,4 @@ DEPENDENCIES
|
|||||||
web-console (~> 2.0)
|
web-console (~> 2.0)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.15.1
|
1.15.3
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ set :repo_url, CAP_CONFIG["default"]["repo_url"]
|
|||||||
|
|
||||||
# Default value for :scm is :git
|
# Default value for :scm is :git
|
||||||
set :scm, :git
|
set :scm, :git
|
||||||
set :git_strategy, Capistrano::Git::SubmoduleStrategy
|
|
||||||
|
|
||||||
# Default value for :format is :airbrussh.
|
# Default value for :format is :airbrussh.
|
||||||
# set :format, :airbrussh
|
# set :format, :airbrussh
|
||||||
@@ -42,12 +41,6 @@ namespace :deploy do
|
|||||||
|
|
||||||
task :npm_install do
|
task :npm_install do
|
||||||
on roles(:app) do
|
on roles(:app) do
|
||||||
with fetch(:git_environmental_variables) do
|
|
||||||
within repo_path do
|
|
||||||
execute *%w[ git submodule update --init --force --remote ]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
within release_path do
|
within release_path do
|
||||||
# string commands dont work, have to use special *%w syntax
|
# string commands dont work, have to use special *%w syntax
|
||||||
execute *%w[ npm install ]
|
execute *%w[ npm install ]
|
||||||
|
|||||||
Reference in New Issue
Block a user