Deploy
This commit is contained in:
parent
033339182b
commit
e0346dca01
2
Gemfile
2
Gemfile
|
@ -41,7 +41,7 @@ gem 'puma'
|
||||||
gem 'mina', require: false
|
gem 'mina', require: false
|
||||||
gem 'mina-multistage', require: false
|
gem 'mina-multistage', require: false
|
||||||
gem 'mina-sidekiq', require: false
|
gem 'mina-sidekiq', require: false
|
||||||
gem 'mina-unicorn', require: false
|
gem 'mina-puma', require: false
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'quiet_assets'
|
gem 'quiet_assets'
|
||||||
|
|
|
@ -152,9 +152,11 @@ GEM
|
||||||
rake
|
rake
|
||||||
mina-multistage (1.0.2)
|
mina-multistage (1.0.2)
|
||||||
mina (>= 0.2.1)
|
mina (>= 0.2.1)
|
||||||
|
mina-puma (0.3.0)
|
||||||
|
mina
|
||||||
|
puma (>= 2.13)
|
||||||
mina-sidekiq (0.3.1)
|
mina-sidekiq (0.3.1)
|
||||||
mina
|
mina
|
||||||
mina-unicorn (0.4.0)
|
|
||||||
mini_magick (4.5.1)
|
mini_magick (4.5.1)
|
||||||
mini_portile2 (2.0.0)
|
mini_portile2 (2.0.0)
|
||||||
minitest (5.8.4)
|
minitest (5.8.4)
|
||||||
|
@ -345,8 +347,8 @@ DEPENDENCIES
|
||||||
listen (~> 3.0.5)
|
listen (~> 3.0.5)
|
||||||
mina
|
mina
|
||||||
mina-multistage
|
mina-multistage
|
||||||
|
mina-puma
|
||||||
mina-sidekiq
|
mina-sidekiq
|
||||||
mina-unicorn
|
|
||||||
mini_magick
|
mini_magick
|
||||||
newrelic_rpm
|
newrelic_rpm
|
||||||
nokogiri
|
nokogiri
|
||||||
|
|
|
@ -5,17 +5,19 @@ require 'mina/multistage'
|
||||||
require 'mina/bundler'
|
require 'mina/bundler'
|
||||||
require 'mina/rails'
|
require 'mina/rails'
|
||||||
require 'mina/git'
|
require 'mina/git'
|
||||||
require 'mina/rvm' # for rvm support. (http://rvm.io)
|
require 'mina/rvm'
|
||||||
require 'mina/unicorn'
|
require 'mina/puma'
|
||||||
require 'mina_sidekiq/tasks'
|
require 'mina_sidekiq/tasks'
|
||||||
|
|
||||||
# Manually create these paths in shared/ (eg: shared/config/database.yml) in your server.
|
# Manually create these paths in shared/ (eg: shared/config/database.yml) in your server.
|
||||||
# They will be linked in the 'deploy:link_shared_paths' step.
|
# They will be linked in the 'deploy:link_shared_paths' step.
|
||||||
set :shared_paths, ['config/mongoid.yml', 'config/application.yml', 'log', 'tmp', 'public/uploads', 'public/personal' ]
|
set :shared_paths, ['config/database.yml', 'config/application.yml', 'log', 'tmp', 'public/uploads', 'public/personal' ]
|
||||||
|
|
||||||
|
# rvm path
|
||||||
|
set :rvm_path, '/usr/local/rvm/scripts/rvm'
|
||||||
|
|
||||||
task :environment do
|
task :environment do
|
||||||
queue! %[source /usr/local/rvm/scripts/rvm]
|
invoke :'rvm:use[2.2.3]'
|
||||||
queue! %[rvm use 2.0.0]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
task :setup => :environment do
|
task :setup => :environment do
|
||||||
|
@ -24,7 +26,7 @@ task :setup => :environment do
|
||||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/#{dir}"]
|
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/#{dir}"]
|
||||||
end
|
end
|
||||||
|
|
||||||
['config/mongoid.yml', 'config/application.yml'].each do |file|
|
['config/database.yml', 'config/application.yml'].each do |file|
|
||||||
queue! %[touch "#{deploy_to}/shared/#{file}"]
|
queue! %[touch "#{deploy_to}/shared/#{file}"]
|
||||||
queue %[echo "-----> Be sure to edit 'shared/#{file}'."]
|
queue %[echo "-----> Be sure to edit 'shared/#{file}'."]
|
||||||
end
|
end
|
||||||
|
@ -47,7 +49,7 @@ task :deploy => :environment do
|
||||||
invoke :'rails:assets_precompile'
|
invoke :'rails:assets_precompile'
|
||||||
|
|
||||||
to :launch do
|
to :launch do
|
||||||
invoke :'unicorn:restart'
|
invoke :'puma:restart'
|
||||||
invoke :'sidekiq:restart'
|
invoke :'sidekiq:restart'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
set :domain, 'yafeilee.me'
|
set :domain, 'yafeilee.me'
|
||||||
set :deploy_to, '/home/ruby/wblog'
|
set :deploy_to, '/home/ruby/wblog'
|
||||||
set :repository, 'git@github.com:windy/wblog.git'
|
set :repository, 'git@github.com:windy/wblog.git'
|
||||||
set :branch, 'master'
|
set :branch, 'new_design'
|
||||||
set :user, 'ruby'
|
set :user, 'ruby'
|
||||||
set :unicorn_config, -> { "#{deploy_to}/#{current_path}/config/unicorn/zh.rb" }
|
|
||||||
|
|
Loading…
Reference in New Issue