Skip to content
Snippets Groups Projects
Commit aab9f57e authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Adding config for puma, dashboard layout, fixing some queries

parent 447cfef6
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env ruby
# This file loads spring without using Bundler, in order to be fast.
# It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring)
require 'rubygems'
require 'bundler'
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
gem 'spring', match[1]
require 'spring/binstub'
end
end
......@@ -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
$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)
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment