File tree Expand file tree Collapse file tree 4 files changed +10
-0
lines changed
Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ gem 'nokogiri', '~> 1.18'
1818gem 'okcomputer' , '~> 1.19'
1919gem 'ougai' , '~> 1.8'
2020gem 'puma' , '~> 6.6.1'
21+ gem 'puma-plugin-delayed_stop' , '~> 0.1.2'
2122gem 'rails' , '~> 8.0.0'
2223gem 'rake'
2324gem 'sass-rails' , '>= 6'
Original file line number Diff line number Diff line change 212212 public_suffix (7.0.0 )
213213 puma (6.6.1 )
214214 nio4r (~> 2.0 )
215+ puma-plugin-delayed_stop (0.1.2 )
216+ puma (>= 5.0 , < 8 )
215217 racc (1.8.1 )
216218 rack (3.2.4 )
217219 rack-proxy (0.7.7 )
@@ -410,6 +412,7 @@ DEPENDENCIES
410412 okcomputer (~> 1.19 )
411413 ougai (~> 1.8 )
412414 puma (~> 6.6.1 )
415+ puma-plugin-delayed_stop (~> 0.1.2 )
413416 rails (~> 8.0.0 )
414417 rake
415418 rspec-rails (~> 8.0 )
Original file line number Diff line number Diff line change 3636# Run the Solid Queue supervisor inside of Puma for single-server deployments
3737plugin :solid_queue if ENV [ "SOLID_QUEUE_IN_PUMA" ]
3838
39+ # enable the delayed_stop plugin to intercept signals
40+ plugin :delayed_stop
41+
3942# Specify the PID file. Defaults to tmp/pids/server.pid in development.
4043# In other environments, only set the PID file if requested.
4144pidfile ENV [ "PIDFILE" ] if ENV [ "PIDFILE" ]
Original file line number Diff line number Diff line change @@ -21,8 +21,11 @@ services:
2121 - db
2222 environment :
2323 DATABASE_URL : ' mysql2://root:root@db:3306/NARA'
24+ PUMA_DELAYED_STOP_DRAIN_SECONDS : 1
2425 ports :
2526 - 3000:3000
2627 restart : always
28+ stop_grace_period : 30s
29+ stop_signal : SIGQUIT
2730 volumes :
2831 - ./:/opt/app:delegated
You can’t perform that action at this time.
0 commit comments