mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Add rainbows config
This commit is contained in:
parent
5deb20e264
commit
f621488b6a
3 changed files with 34 additions and 0 deletions
1
Gemfile
1
Gemfile
|
@ -6,6 +6,7 @@ gem 'sequel'
|
|||
gem 'slim'
|
||||
gem 'bcrypt-ruby', require: 'bcrypt'
|
||||
gem 'sinatra-flash', require: 'sinatra/flash'
|
||||
gem 'sinatra-xsendfile', require: 'sinatra/xsendfile'
|
||||
gem 'puma', require: nil
|
||||
|
||||
platform :mri do
|
||||
|
|
|
@ -64,6 +64,8 @@ GEM
|
|||
tilt (~> 1.3, >= 1.3.4)
|
||||
sinatra-flash (0.3.0)
|
||||
sinatra (>= 1.0.0)
|
||||
sinatra-xsendfile (0.4.0)
|
||||
sinatra (>= 0.9.1)
|
||||
slim (1.3.9)
|
||||
temple (~> 0.6.3)
|
||||
tilt (~> 1.3, >= 1.3.3)
|
||||
|
@ -101,5 +103,6 @@ DEPENDENCIES
|
|||
simplecov
|
||||
sinatra
|
||||
sinatra-flash
|
||||
sinatra-xsendfile
|
||||
slim
|
||||
webmock
|
||||
|
|
30
rainbows_config.rb
Normal file
30
rainbows_config.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
Rainbows! do
|
||||
name = 'neocities'
|
||||
|
||||
use :ThreadPool
|
||||
|
||||
client_max_body_size 1*1024*1024 # 1 Megabyte
|
||||
|
||||
worker_processes 8
|
||||
worker_connections 32
|
||||
timeout 10
|
||||
|
||||
listen "unix:tmp/#{name}.sock", :backlog => 2048
|
||||
|
||||
pid "tmp/#{name}.pid"
|
||||
stderr_path "tmp/#{name}.log"
|
||||
stdout_path "tmp/#{name}.log"
|
||||
|
||||
preload_app true
|
||||
|
||||
before_fork do |server, worker|
|
||||
old_pid = "tmp/#{name}.pid.oldbin"
|
||||
if File.exists?(old_pid) && server.pid != old_pid
|
||||
begin
|
||||
Process.kill("QUIT", File.read(old_pid).to_i)
|
||||
rescue Errno::ENOENT, Errno::ESRCH
|
||||
# someone else did our job for us
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue