diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 5 | ||||
-rw-r--r-- | config/initializers/redis.rb | 2 | ||||
-rw-r--r-- | config/puma.rb | 13 | ||||
-rw-r--r-- | config/routes.rb | 2 |
4 files changed, 19 insertions, 3 deletions
diff --git a/config/application.rb b/config/application.rb index 3f23b0a94..e7634854a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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 diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb index 14f3778c4..a4e4cfc48 100644 --- a/config/initializers/redis.rb +++ b/config/initializers/redis.rb @@ -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) diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..49f4b974d --- /dev/null +++ b/config/puma.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index d63bdf981..70cd20a82 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -49,5 +49,7 @@ Rails.application.routes.draw do end end + get '/mentions', to: 'home#mentions', as: :mentions + root 'home#index' end |