添加 sidekiq 的布署脚本
This commit is contained in:
parent
369184d4f1
commit
193a96d055
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
/public/uploads/*
|
/public/uploads/*
|
||||||
|
|
||||||
/config/*.yml
|
/config/application.yml
|
||||||
|
/config/mongoid.yml
|
||||||
/public/assets/*
|
/public/assets/*
|
||||||
*.old
|
*.old
|
||||||
|
|
1
Gemfile
1
Gemfile
|
@ -29,6 +29,7 @@ gem 'figaro'
|
||||||
gem 'rqrcode-with-patches', require: 'rqrcode'
|
gem 'rqrcode-with-patches', require: 'rqrcode'
|
||||||
gem 'chunky_png'
|
gem 'chunky_png'
|
||||||
gem 'sidekiq'
|
gem 'sidekiq'
|
||||||
|
gem 'mina-sidekiq'
|
||||||
gem 'rest-client'
|
gem 'rest-client'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
|
|
@ -113,6 +113,11 @@ GEM
|
||||||
treetop (~> 1.4.8)
|
treetop (~> 1.4.8)
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (1.25.1)
|
mime-types (1.25.1)
|
||||||
|
mina (0.3.0)
|
||||||
|
open4
|
||||||
|
rake
|
||||||
|
mina-sidekiq (0.3.0)
|
||||||
|
mina
|
||||||
mini_magick (3.7.0)
|
mini_magick (3.7.0)
|
||||||
subexec (~> 0.2.1)
|
subexec (~> 0.2.1)
|
||||||
mini_portile (0.5.3)
|
mini_portile (0.5.3)
|
||||||
|
@ -140,6 +145,7 @@ GEM
|
||||||
nio4r (1.0.0)
|
nio4r (1.0.0)
|
||||||
nokogiri (1.6.1)
|
nokogiri (1.6.1)
|
||||||
mini_portile (~> 0.5.0)
|
mini_portile (~> 0.5.0)
|
||||||
|
open4 (1.3.3)
|
||||||
optionable (0.2.0)
|
optionable (0.2.0)
|
||||||
origin (2.1.0)
|
origin (2.1.0)
|
||||||
polyglot (0.3.4)
|
polyglot (0.3.4)
|
||||||
|
@ -271,6 +277,7 @@ DEPENDENCIES
|
||||||
guard-rspec
|
guard-rspec
|
||||||
html_truncator
|
html_truncator
|
||||||
jquery-rails
|
jquery-rails
|
||||||
|
mina-sidekiq
|
||||||
mini_magick
|
mini_magick
|
||||||
mongoid
|
mongoid
|
||||||
mongoid-pagination
|
mongoid-pagination
|
||||||
|
|
|
@ -2,6 +2,7 @@ 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' # for rvm support. (http://rvm.io)
|
||||||
|
require 'mina_sidekiq/tasks'
|
||||||
|
|
||||||
set :domain, 'yafeilee.me'
|
set :domain, 'yafeilee.me'
|
||||||
set :deploy_to, '/home/ruby/wblog'
|
set :deploy_to, '/home/ruby/wblog'
|
||||||
|
@ -37,6 +38,7 @@ task :deploy => :environment do
|
||||||
deploy do
|
deploy do
|
||||||
# Put things that will set up an empty directory into a fully set-up
|
# Put things that will set up an empty directory into a fully set-up
|
||||||
# instance of your project.
|
# instance of your project.
|
||||||
|
invoke :'sidekiq:quiet'
|
||||||
invoke :'git:clone'
|
invoke :'git:clone'
|
||||||
invoke :'deploy:link_shared_paths'
|
invoke :'deploy:link_shared_paths'
|
||||||
invoke :'bundle:install'
|
invoke :'bundle:install'
|
||||||
|
@ -45,6 +47,7 @@ task :deploy => :environment do
|
||||||
|
|
||||||
to :launch do
|
to :launch do
|
||||||
invoke :'unicorn:restart'
|
invoke :'unicorn:restart'
|
||||||
|
invoke :'sidekiq:restart'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
:concurrency: 2
|
||||||
|
:pidfile: tmp/pids/sidekiq.pid
|
||||||
|
staging:
|
||||||
|
:concurrency: 10
|
||||||
|
production:
|
||||||
|
:concurrency: 20
|
||||||
|
:queues:
|
||||||
|
- default
|
Loading…
Reference in New Issue