This commit is contained in:
yafeilee 2016-04-24 15:22:24 +08:00
parent 033339182b
commit e0346dca01
4 changed files with 15 additions and 12 deletions

View File

@ -41,7 +41,7 @@ gem 'puma'
gem 'mina', require: false
gem 'mina-multistage', require: false
gem 'mina-sidekiq', require: false
gem 'mina-unicorn', require: false
gem 'mina-puma', require: false
group :development do
gem 'quiet_assets'

View File

@ -152,9 +152,11 @@ GEM
rake
mina-multistage (1.0.2)
mina (>= 0.2.1)
mina-puma (0.3.0)
mina
puma (>= 2.13)
mina-sidekiq (0.3.1)
mina
mina-unicorn (0.4.0)
mini_magick (4.5.1)
mini_portile2 (2.0.0)
minitest (5.8.4)
@ -345,8 +347,8 @@ DEPENDENCIES
listen (~> 3.0.5)
mina
mina-multistage
mina-puma
mina-sidekiq
mina-unicorn
mini_magick
newrelic_rpm
nokogiri

View File

@ -5,17 +5,19 @@ require 'mina/multistage'
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm' # for rvm support. (http://rvm.io)
require 'mina/unicorn'
require 'mina/rvm'
require 'mina/puma'
require 'mina_sidekiq/tasks'
# 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.
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
queue! %[source /usr/local/rvm/scripts/rvm]
queue! %[rvm use 2.0.0]
invoke :'rvm:use[2.2.3]'
end
task :setup => :environment do
@ -24,7 +26,7 @@ task :setup => :environment do
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/#{dir}"]
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 %[echo "-----> Be sure to edit 'shared/#{file}'."]
end
@ -47,7 +49,7 @@ task :deploy => :environment do
invoke :'rails:assets_precompile'
to :launch do
invoke :'unicorn:restart'
invoke :'puma:restart'
invoke :'sidekiq:restart'
end
end

View File

@ -1,6 +1,5 @@
set :domain, 'yafeilee.me'
set :deploy_to, '/home/ruby/wblog'
set :repository, 'git@github.com:windy/wblog.git'
set :branch, 'master'
set :branch, 'new_design'
set :user, 'ruby'
set :unicorn_config, -> { "#{deploy_to}/#{current_path}/config/unicorn/zh.rb" }