Created
July 25, 2025 12:53
-
-
Save eniehack/b095bb9a544364f783f3ca1c8556cf22 to your computer and use it in GitHub Desktop.
tdiaryをpumaで動かすためのスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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