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/passenger'
|
||||
# require 'capistrano/sidekiq'
|
||||
require 'capistrano/git-submodule-strategy'
|
||||
# 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
|
||||
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-rvm'
|
||||
gem 'capistrano-sidekiq'
|
||||
gem 'capistrano-git-submodule-strategy', '~> 0.1.22'
|
||||
gem 'capistrano-git-with-submodules', '~> 2.0'
|
||||
end
|
||||
|
||||
23
Gemfile.lock
23
Gemfile.lock
@@ -38,7 +38,7 @@ GEM
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
airbrussh (1.1.1)
|
||||
airbrussh (1.3.0)
|
||||
sshkit (>= 1.6.1, != 1.7.0)
|
||||
arel (7.1.4)
|
||||
binding_of_caller (0.7.2)
|
||||
@@ -46,18 +46,16 @@ GEM
|
||||
bower-rails (0.10.0)
|
||||
builder (3.2.2)
|
||||
byebug (9.0.6)
|
||||
capistrano (3.6.1)
|
||||
capistrano (3.10.1)
|
||||
airbrussh (>= 1.0.0)
|
||||
capistrano-harrow
|
||||
i18n
|
||||
rake (>= 10.0.0)
|
||||
sshkit (>= 1.9.0)
|
||||
capistrano-bundler (1.2.0)
|
||||
capistrano (~> 3.1)
|
||||
sshkit (~> 1.2)
|
||||
capistrano-git-submodule-strategy (0.1.22)
|
||||
capistrano (~> 3.1)
|
||||
capistrano-harrow (0.5.3)
|
||||
capistrano-git-with-submodules (2.0.3)
|
||||
capistrano (~> 3.7)
|
||||
capistrano-passenger (0.2.0)
|
||||
capistrano (~> 3.0)
|
||||
capistrano-rails (1.2.0)
|
||||
@@ -82,7 +80,8 @@ GEM
|
||||
activesupport (>= 4.1.0)
|
||||
haml (4.0.7)
|
||||
tilt
|
||||
i18n (0.7.0)
|
||||
i18n (0.9.3)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (1.8.3)
|
||||
loofah (2.0.3)
|
||||
nokogiri (>= 1.5.9)
|
||||
@@ -96,7 +95,7 @@ GEM
|
||||
minitest (5.9.1)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (3.2.0)
|
||||
net-ssh (4.2.0)
|
||||
nio4r (1.2.1)
|
||||
nokogiri (1.6.8.1)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
@@ -132,7 +131,7 @@ GEM
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rake (11.3.0)
|
||||
rake (12.3.0)
|
||||
rdoc (4.3.0)
|
||||
redis (3.3.2)
|
||||
responders (2.3.0)
|
||||
@@ -157,7 +156,7 @@ GEM
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
sshkit (1.11.4)
|
||||
sshkit (1.15.1)
|
||||
net-scp (>= 1.1.2)
|
||||
net-ssh (>= 2.8.0)
|
||||
thor (0.19.4)
|
||||
@@ -185,7 +184,7 @@ DEPENDENCIES
|
||||
byebug
|
||||
capistrano
|
||||
capistrano-bundler
|
||||
capistrano-git-submodule-strategy (~> 0.1.22)
|
||||
capistrano-git-with-submodules (~> 2.0)
|
||||
capistrano-passenger (>= 0.2.0)
|
||||
capistrano-rails
|
||||
capistrano-rvm
|
||||
@@ -205,4 +204,4 @@ DEPENDENCIES
|
||||
web-console (~> 2.0)
|
||||
|
||||
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
|
||||
set :scm, :git
|
||||
set :git_strategy, Capistrano::Git::SubmoduleStrategy
|
||||
|
||||
# Default value for :format is :airbrussh.
|
||||
# set :format, :airbrussh
|
||||
@@ -42,12 +41,6 @@ namespace :deploy do
|
||||
|
||||
task :npm_install 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
|
||||
# string commands dont work, have to use special *%w syntax
|
||||
execute *%w[ npm install ]
|
||||
|
||||
Reference in New Issue
Block a user