mirror of
https://github.com/moebooru/moebooru
synced 2025-08-22 01:47:48 +00:00
21 lines
571 B
Ruby
21 lines
571 B
Ruby
# This file is used by Rack-based servers to start the application.
|
|
if defined? Unicorn
|
|
require "unicorn/worker_killer"
|
|
use Unicorn::WorkerKiller::MaxRequests, 4096, 8192
|
|
use Unicorn::WorkerKiller::Oom, (384*(1024**2)), (512*(1024**2))
|
|
end
|
|
|
|
require_relative "config/environment"
|
|
# Passenger hates map. And only it, AFAICT.
|
|
if defined? PhusionPassenger
|
|
run Rails.application
|
|
Rails.application.load_server
|
|
else
|
|
ENV["RAILS_RELATIVE_URL_ROOT"] ||= "/"
|
|
|
|
map ENV["RAILS_RELATIVE_URL_ROOT"] do
|
|
run Rails.application
|
|
Rails.application.load_server
|
|
end
|
|
end
|