2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-22 01:47:48 +00:00
moebooru/config.ru

21 lines
571 B
Plaintext
Raw Normal View History

2012-05-08 06:01:18 +00:00
# This file is used by Rack-based servers to start the application.
2012-06-25 07:57:36 -07:00
if defined? Unicorn
require "unicorn/worker_killer"
2013-08-05 09:34:18 -07:00
use Unicorn::WorkerKiller::MaxRequests, 4096, 8192
2017-04-02 17:06:10 +09:00
use Unicorn::WorkerKiller::Oom, (384*(1024**2)), (512*(1024**2))
2012-06-25 07:57:36 -07:00
end
2021-02-11 16:57:35 +09:00
require_relative "config/environment"
# Passenger hates map. And only it, AFAICT.
if defined? PhusionPassenger
2021-02-11 16:57:35 +09:00
run Rails.application
Rails.application.load_server
else
2015-10-10 17:49:40 +09:00
ENV["RAILS_RELATIVE_URL_ROOT"] ||= "/"
map ENV["RAILS_RELATIVE_URL_ROOT"] do
2021-02-11 16:57:35 +09:00
run Rails.application
Rails.application.load_server
end
end