Merge branch 'master' of uflows.com:/var/git/qwaiter
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
2.2.0
|
|
||||||
@@ -20,6 +20,8 @@ require 'capistrano/rvm'
|
|||||||
require 'capistrano/bundler'
|
require 'capistrano/bundler'
|
||||||
require 'capistrano/rails/assets'
|
require 'capistrano/rails/assets'
|
||||||
# require 'capistrano/rails/migrations'
|
# require 'capistrano/rails/migrations'
|
||||||
|
require 'capistrano/puma'
|
||||||
|
require "airbrussh/capistrano"
|
||||||
|
|
||||||
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
|
# Loads 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,10 +2,10 @@ source 'https://rails-assets.org'
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '4.2.0'
|
gem 'rails', '4.2.0'
|
||||||
gem 'rack-cors', :require => 'rack/cors'
|
gem 'rack-cors', require: 'rack/cors'
|
||||||
|
|
||||||
# Bundle edge Rails instead:
|
# Bundle edge Rails instead:
|
||||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
# gem 'rails', git: 'git://github.com/rails/rails.git'
|
||||||
|
|
||||||
# gem 'sqlite3'
|
# gem 'sqlite3'
|
||||||
|
|
||||||
@@ -30,10 +30,10 @@ group :assets do
|
|||||||
#gem 'compass-rails'
|
#gem 'compass-rails'
|
||||||
gem 'js-routes'
|
gem 'js-routes'
|
||||||
gem "font-awesome-rails"
|
gem "font-awesome-rails"
|
||||||
gem 'capistrano-local-precompile', require: false
|
#gem 'capistrano-local-precompile', require: false
|
||||||
|
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
#gem 'therubyracer', :platforms => :ruby
|
#gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
gem 'uglifier', '>= 1.0.3'
|
gem 'uglifier', '>= 1.0.3'
|
||||||
#gem "emblem-source", github: "machty/emblem.js"
|
#gem "emblem-source", github: "machty/emblem.js"
|
||||||
@@ -43,7 +43,7 @@ group :assets do
|
|||||||
|
|
||||||
gem 'foundation-rails' #, github: 'bterkuile/foundation-rails'
|
gem 'foundation-rails' #, github: 'bterkuile/foundation-rails'
|
||||||
gem 'ace-rails-ap'
|
gem 'ace-rails-ap'
|
||||||
#gem 'mustache' #, :require => 'mustache/railtie'
|
#gem 'mustache' #, require: 'mustache/railtie'
|
||||||
end
|
end
|
||||||
|
|
||||||
#gem 'less-rails'
|
#gem 'less-rails'
|
||||||
@@ -79,7 +79,7 @@ gem 'sucker_punch'
|
|||||||
|
|
||||||
#gem 'geokit'
|
#gem 'geokit'
|
||||||
gem 'iso_country_codes'
|
gem 'iso_country_codes'
|
||||||
#gem "less-rails-bootstrap-devise", :git => 'git://github.com/bigbento/less-rails-bootstrap-devise.git'
|
#gem "less-rails-bootstrap-devise", git: 'git://github.com/bigbento/less-rails-bootstrap-devise.git'
|
||||||
|
|
||||||
# To use ActiveModel has_secure_password
|
# To use ActiveModel has_secure_password
|
||||||
# gem 'bcrypt-ruby', '~> 3.0.0'
|
# gem 'bcrypt-ruby', '~> 3.0.0'
|
||||||
@@ -105,14 +105,16 @@ group :development do
|
|||||||
gem 'letter_opener'
|
gem 'letter_opener'
|
||||||
# gem 'thin'
|
# gem 'thin'
|
||||||
gem 'faye'
|
gem 'faye'
|
||||||
gem 'capistrano', '~> 3.0', require: false
|
gem 'capistrano', require: false
|
||||||
gem 'capistrano-rvm', '~> 0.1', require: false
|
gem 'capistrano-bundler', require: false
|
||||||
gem 'capistrano-rails', '~> 1.1', require: false
|
gem 'capistrano-rvm', require: false
|
||||||
|
gem 'capistrano-rails', require: false
|
||||||
|
gem 'capistrano3-puma', require: false
|
||||||
|
gem "airbrussh", require: false
|
||||||
gem 'spring'
|
gem 'spring'
|
||||||
gem 'spring-commands-rspec'
|
gem 'spring-commands-rspec'
|
||||||
gem 'web-console', '~> 2.0.0'
|
gem 'web-console', '~> 2.0.0'
|
||||||
gem 'foreman'
|
gem 'foreman'
|
||||||
gem 'thin'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
@@ -125,12 +127,13 @@ group :test do
|
|||||||
gem 'launchy'
|
gem 'launchy'
|
||||||
gem 'fuubar'
|
gem 'fuubar'
|
||||||
gem 'webmock'
|
gem 'webmock'
|
||||||
#gem 'rb-fsevent', :require => false #if RUBY_PLATFORM =~ /darwin/i
|
#gem 'rb-fsevent', require: false #if RUBY_PLATFORM =~ /darwin/i
|
||||||
gem 'simplecov', require: false
|
gem 'simplecov', require: false
|
||||||
end
|
end
|
||||||
|
|
||||||
# Use unicorn as the app server
|
# Use unicorn as the app server
|
||||||
# gem 'unicorn'
|
# gem 'unicorn'
|
||||||
|
gem 'puma'
|
||||||
|
|
||||||
# Deploy with Capistrano
|
# Deploy with Capistrano
|
||||||
# gem 'capistrano'
|
# gem 'capistrano'
|
||||||
|
|||||||
+15
-13
@@ -90,6 +90,8 @@ GEM
|
|||||||
thread_safe (~> 0.3, >= 0.3.4)
|
thread_safe (~> 0.3, >= 0.3.4)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.3.7)
|
addressable (2.3.7)
|
||||||
|
airbrussh (0.4.1)
|
||||||
|
sshkit (>= 1.6.1, != 1.7.0)
|
||||||
arel (6.0.0)
|
arel (6.0.0)
|
||||||
barber (0.6.0)
|
barber (0.6.0)
|
||||||
ember-source
|
ember-source
|
||||||
@@ -113,14 +115,15 @@ GEM
|
|||||||
capistrano-bundler (1.1.4)
|
capistrano-bundler (1.1.4)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
sshkit (~> 1.2)
|
sshkit (~> 1.2)
|
||||||
capistrano-local-precompile (0.0.2)
|
|
||||||
capistrano
|
|
||||||
capistrano-rails (1.1.2)
|
capistrano-rails (1.1.2)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
capistrano-bundler (~> 1.1)
|
capistrano-bundler (~> 1.1)
|
||||||
capistrano-rvm (0.1.2)
|
capistrano-rvm (0.1.2)
|
||||||
capistrano (~> 3.0)
|
capistrano (~> 3.0)
|
||||||
sshkit (~> 1.2)
|
sshkit (~> 1.2)
|
||||||
|
capistrano3-puma (1.0.0)
|
||||||
|
capistrano (~> 3.0)
|
||||||
|
puma (>= 2.6)
|
||||||
capybara (2.4.4)
|
capybara (2.4.4)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
nokogiri (>= 1.3.3)
|
nokogiri (>= 1.3.3)
|
||||||
@@ -149,7 +152,7 @@ GEM
|
|||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.9.1)
|
coffee-script-source (1.9.1)
|
||||||
colored (1.2)
|
colored (1.2)
|
||||||
colorize (0.7.5)
|
colorize (0.7.7)
|
||||||
cookiejar (0.3.2)
|
cookiejar (0.3.2)
|
||||||
couchrest (1.2.0)
|
couchrest (1.2.0)
|
||||||
mime-types (~> 1.15)
|
mime-types (~> 1.15)
|
||||||
@@ -157,7 +160,6 @@ GEM
|
|||||||
rest-client (~> 1.6.1)
|
rest-client (~> 1.6.1)
|
||||||
crack (0.4.2)
|
crack (0.4.2)
|
||||||
safe_yaml (~> 1.0.0)
|
safe_yaml (~> 1.0.0)
|
||||||
daemons (1.1.9)
|
|
||||||
debug_inspector (0.0.2)
|
debug_inspector (0.0.2)
|
||||||
devise (3.4.1)
|
devise (3.4.1)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
@@ -320,6 +322,8 @@ GEM
|
|||||||
slop (~> 3.4)
|
slop (~> 3.4)
|
||||||
pry-rails (0.3.3)
|
pry-rails (0.3.3)
|
||||||
pry (>= 0.9.10)
|
pry (>= 0.9.10)
|
||||||
|
puma (2.11.3)
|
||||||
|
rack (>= 1.1, < 2.0)
|
||||||
quiet_assets (1.1.0)
|
quiet_assets (1.1.0)
|
||||||
railties (>= 3.1, < 5.0)
|
railties (>= 3.1, < 5.0)
|
||||||
rack (1.6.0)
|
rack (1.6.0)
|
||||||
@@ -435,10 +439,6 @@ GEM
|
|||||||
temple (0.7.5)
|
temple (0.7.5)
|
||||||
test_squad (0.0.1)
|
test_squad (0.0.1)
|
||||||
rails
|
rails
|
||||||
thin (1.6.3)
|
|
||||||
daemons (~> 1.0, >= 1.0.9)
|
|
||||||
eventmachine (~> 1.0)
|
|
||||||
rack (~> 1.0)
|
|
||||||
thor (0.19.1)
|
thor (0.19.1)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.5)
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
@@ -479,12 +479,14 @@ DEPENDENCIES
|
|||||||
active_attr
|
active_attr
|
||||||
active_decorator
|
active_decorator
|
||||||
active_model_serializers (= 0.9.0)
|
active_model_serializers (= 0.9.0)
|
||||||
|
airbrussh
|
||||||
bourbon
|
bourbon
|
||||||
cancancan
|
cancancan
|
||||||
capistrano (~> 3.0)
|
capistrano
|
||||||
capistrano-local-precompile
|
capistrano-bundler
|
||||||
capistrano-rails (~> 1.1)
|
capistrano-rails
|
||||||
capistrano-rvm (~> 0.1)
|
capistrano-rvm
|
||||||
|
capistrano3-puma
|
||||||
capybara-screenshot
|
capybara-screenshot
|
||||||
cmtool!
|
cmtool!
|
||||||
coffee-rails
|
coffee-rails
|
||||||
@@ -518,6 +520,7 @@ DEPENDENCIES
|
|||||||
paperclip
|
paperclip
|
||||||
poltergeist
|
poltergeist
|
||||||
pry-rails
|
pry-rails
|
||||||
|
puma
|
||||||
quiet_assets
|
quiet_assets
|
||||||
rack-cors
|
rack-cors
|
||||||
rails (= 4.2.0)
|
rails (= 4.2.0)
|
||||||
@@ -535,7 +538,6 @@ DEPENDENCIES
|
|||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
sucker_punch
|
sucker_punch
|
||||||
test_squad
|
test_squad
|
||||||
thin
|
|
||||||
turnip
|
turnip
|
||||||
uglifier (>= 1.0.3)
|
uglifier (>= 1.0.3)
|
||||||
web-console (~> 2.0.0)
|
web-console (~> 2.0.0)
|
||||||
|
|||||||
+54
-6
@@ -32,12 +32,23 @@ set :deploy_to, '/var/www/mozo.bar'
|
|||||||
# set :linked_files, %w{config/database.yml}
|
# set :linked_files, %w{config/database.yml}
|
||||||
|
|
||||||
# Default value for linked_dirs is []
|
# Default value for linked_dirs is []
|
||||||
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
|
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/assets}
|
||||||
|
|
||||||
# Default value for default_env is {}
|
# Default value for default_env is {}
|
||||||
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
||||||
set :default_env, {'DEPLOY' => 'yes'}
|
set :default_env, {'DEPLOY' => 'yes'}
|
||||||
|
|
||||||
|
set :puma_threads, [4, 16]
|
||||||
|
set :puma_workers, 2
|
||||||
|
set :puma_bind, "unix://#{shared_path}/tmp/sockets/app.sock"
|
||||||
|
set :puma_state, "#{shared_path}/tmp/pids/puma.state"
|
||||||
|
set :puma_pid, "#{shared_path}/tmp/pids/puma.pid"
|
||||||
|
set :puma_access_log, "#{release_path}/log/puma.error.log"
|
||||||
|
set :puma_error_log, "#{release_path}/log/puma.access.log"
|
||||||
|
set :puma_preload_app, true
|
||||||
|
set :puma_worker_timeout, nil
|
||||||
|
set :puma_init_active_record, false # Change to true if using ActiveRecord
|
||||||
|
|
||||||
# Default value for keep_releases is 5
|
# Default value for keep_releases is 5
|
||||||
# set :keep_releases, 5
|
# set :keep_releases, 5
|
||||||
|
|
||||||
@@ -49,12 +60,12 @@ namespace :deploy do
|
|||||||
# Your restart mechanism here, for example:
|
# Your restart mechanism here, for example:
|
||||||
within release_path do
|
within release_path do
|
||||||
#execute :rake, 'cache:clear', as: 'www-data'
|
#execute :rake, 'cache:clear', as: 'www-data'
|
||||||
with rails_env: fetch(:rails_env) do
|
#with rails_env: fetch(:rails_env) do
|
||||||
execute :rake, 'dedigest_assets', as: 'www-data'
|
#execute :rake, 'dedigest_assets', as: 'www-data'
|
||||||
end
|
#end
|
||||||
end
|
end
|
||||||
execute :chown, "-R www-data:www-data", release_path
|
#execute :chown, "-R www-data:www-data", release_path
|
||||||
execute :chown, "-R www-data:www-data", release_path.join('public/assets/')
|
#execute :chown, "-R www-data:www-data", release_path.join('public/assets/')
|
||||||
#execute :kill, capture("lsof -i:9022 -t") # kill counters, will reboot itself
|
#execute :kill, capture("lsof -i:9022 -t") # kill counters, will reboot itself
|
||||||
execute :touch, release_path.join('tmp/restart.txt')
|
execute :touch, release_path.join('tmp/restart.txt')
|
||||||
end
|
end
|
||||||
@@ -72,6 +83,43 @@ namespace :deploy do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
namespace :assets do
|
||||||
|
|
||||||
|
Rake::Task['deploy:assets:precompile'].clear_actions
|
||||||
|
Rake::Task['deploy:assets:backup_manifest'].clear_actions
|
||||||
|
|
||||||
|
desc 'Precompile assets locally and upload to servers'
|
||||||
|
task :precompile do
|
||||||
|
on roles(fetch(:assets_roles)) do
|
||||||
|
run_locally do
|
||||||
|
with rails_env: fetch(:rails_env) do
|
||||||
|
execute 'bin/rake assets:precompile'
|
||||||
|
execute 'bin/rake dedigest_assets'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#within release_path do
|
||||||
|
#with rails_env: fetch(:rails_env) do
|
||||||
|
#upload!('./public/assets/', "#{shared_path}/public/", recursive: true)
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
rsync_host = host
|
||||||
|
run_locally { execute "rsync -av --delete ./public/assets/ #{fetch(:user)}@#{rsync_host}:#{shared_path}/public/assets/" }
|
||||||
|
execute :chown, "-R www-data:www-data", shared_path.join('public/assets/')
|
||||||
|
|
||||||
|
run_locally { execute 'rm -rf public/assets' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
#desc 'Set config/puma.rb-symlink for upstart'
|
||||||
|
#task :puma_config do
|
||||||
|
#on roles(:app) do
|
||||||
|
#execute "ln -sf #{shared_path}/puma.rb #{release_path}/config/puma.rb"
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#after :finishing, :puma_config
|
||||||
|
|
||||||
after :publishing, :restart do
|
after :publishing, :restart do
|
||||||
#deploy.update_remote_cache
|
#deploy.update_remote_cache
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user