Skip to content

Instantly share code, notes, and snippets.

@eniehack
Created July 25, 2025 12:53
Show Gist options
  • Save eniehack/b095bb9a544364f783f3ca1c8556cf22 to your computer and use it in GitHub Desktop.
Save eniehack/b095bb9a544364f783f3ca1c8556cf22 to your computer and use it in GitHub Desktop.
tdiaryをpumaで動かすためのスクリプト
# https://transitive.info/2018/08/21/onamae-vps-tdiary-nginx-puma/ を参考にtdiaryをpumaで動かすためのスクリプト。
# usage: puma -C puma.rb
workers 1
threads 2, 5
preload_app!
RUNTIME_DIR = ENV['XDG_RUNTIME_DIR'] || ENV['XDG_STATE_HOME']
bind "tcp://127.0.0.1:3000"
pidfile File.join(RUNTIME_DIR, 'puma_tdiary.pid')
before_fork do
require 'puma_worker_killer'
PumaWorkerKiller.enable_rolling_restart(24 * 3600)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment