-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #384 from cbdr/puma
Unicorn -> Puma
- Loading branch information
Showing
20 changed files
with
167 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
web: bundle exec unicorn -c ./config/unicorn.rb -E $RAILS_ENV -D | ||
web: bundle exec puma -e $RACK_ENV -b unix:///tmp/web_server.sock --pidfile /tmp/web_server.pid -d | ||
worker: bundle exec sidekiq -e $RAILS_ENV -q default -q mailers | ||
custom_web: bundle exec unicorn -c ./config/unicorn.rb -E $RAILS_ENV -D | ||
custom_web: bundle exec puma -e $RACK_ENV -b unix:///tmp/web_server.sock --pidfile /tmp/web_server.pid -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
APP_PATH = File.expand_path('../../config/application', __FILE__) | ||
APP_PATH = File.expand_path('../config/application', __dir__) | ||
require_relative '../config/boot' | ||
require 'rails/commands' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env ruby | ||
require 'pathname' | ||
require 'fileutils' | ||
include FileUtils | ||
|
||
# path to your application root. | ||
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | ||
|
||
def system!(*args) | ||
system(*args) || abort("\n== Command #{args} failed ==") | ||
end | ||
|
||
chdir APP_ROOT do | ||
# This script is a way to update your development environment automatically. | ||
# Add necessary update steps to this file. | ||
|
||
puts '== Installing dependencies ==' | ||
system! 'gem install bundler --conservative' | ||
system('bundle check') || system!('bundle install') | ||
|
||
puts "\n== Updating database ==" | ||
system! 'bin/rails db:migrate' | ||
|
||
puts "\n== Removing old logs and tempfiles ==" | ||
system! 'bin/rails log:clear tmp:clear' | ||
|
||
puts "\n== Restarting application server ==" | ||
system! 'bin/rails restart' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# This file is used by Rack-based servers to start the application. | ||
|
||
require ::File.expand_path('../config/environment', __FILE__) | ||
require_relative 'config/environment' | ||
|
||
run Rails.application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Set up gems listed in the Gemfile. | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | ||
|
||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) | ||
require 'bundler/setup' | ||
|
||
# Cache requires | ||
require 'bootscale/setup' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
development: | ||
adapter: async | ||
|
||
test: | ||
adapter: async | ||
|
||
production: | ||
adapter: redis | ||
url: redis://localhost:6379/1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Load the Rails application. | ||
require File.expand_path('../application', __FILE__) | ||
require_relative 'application' | ||
|
||
# Initialize the Rails application. | ||
Cortex::Application.initialize! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# ApplicationController.renderer.defaults.merge!( | ||
# http_host: 'example.org', | ||
# https: false | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Specify a serializer for the signed and encrypted cookie jars. | ||
# Valid options are :json, :marshal, and :hybrid. | ||
Rails.application.config.action_dispatch.cookies_serializer = :json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Be sure to restart your server when you modify this file. | ||
# | ||
# This file contains migration options to ease your Rails 5.0 upgrade. | ||
# | ||
# Once upgraded flip defaults one by one to migrate to the new default. | ||
# | ||
# Read the Rails 5.0 release notes for more info on each option. | ||
|
||
# Enable per-form CSRF tokens. Previous versions had false. | ||
Rails.application.config.action_controller.per_form_csrf_tokens = false | ||
|
||
# Enable origin-checking CSRF mitigation. Previous versions had false. | ||
Rails.application.config.action_controller.forgery_protection_origin_check = false | ||
|
||
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. | ||
# Previous versions had false. | ||
ActiveSupport.to_time_preserves_timezone = false | ||
|
||
# Require `belongs_to` associations by default. Previous versions had false. | ||
Rails.application.config.active_record.belongs_to_required_by_default = false | ||
|
||
# Do not halt callback chains when a callback returns false. Previous versions had true. | ||
ActiveSupport.halt_callback_chains_on_return_false = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.