Adding config for puma, dashboard layout, fixing some queries
This commit is contained in:
@ -29,8 +29,9 @@ module Mastodon
|
||||
config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')]
|
||||
|
||||
config.to_prepare do
|
||||
Doorkeeper::AuthorizationsController.layout 'auth'
|
||||
Doorkeeper::AuthorizedApplicationsController.layout 'auth'
|
||||
Doorkeeper::ApplicationsController.layout 'dashboard'
|
||||
Doorkeeper::AuthorizedApplicationsController.layout 'dashboard'
|
||||
Doorkeeper::AuthorizationsController.layout 'auth'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1 +1 @@
|
||||
$redis = Redis.new(host: ENV['REDIS_HOST'] || 'localhost', port: ENV['REDIS_PORT'] || 6379)
|
||||
$redis = Redis.new(host: ENV['REDIS_HOST'] || 'localhost', port: ENV['REDIS_PORT'] || 6379, driver: :hiredis)
|
||||
|
||||
13
config/puma.rb
Normal file
13
config/puma.rb
Normal file
@ -0,0 +1,13 @@
|
||||
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
|
||||
threads_count = Integer(ENV['MAX_THREADS'] || 5)
|
||||
threads threads_count, threads_count
|
||||
|
||||
preload_app!
|
||||
|
||||
rackup DefaultRackup
|
||||
port ENV['PORT'] || 3000
|
||||
environment ENV['RACK_ENV'] || 'development'
|
||||
|
||||
on_worker_boot do
|
||||
ActiveRecord::Base.establish_connection
|
||||
end
|
||||
@ -49,5 +49,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
get '/mentions', to: 'home#mentions', as: :mentions
|
||||
|
||||
root 'home#index'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user