In the process list Puma shows up like this:
puma 6.4.0 (tcp://localhost:3000) [rails]
The name between square brackets is the name of the directory where the application is booted from. This is okay for most situations. With the default Dockerfile in Rails 7.1+ the directory name will always be “rails”.
If you run multiple containers (of different applications) on a single host the process list wil look something like this:
puma 6.4.0 (tcp://localhost:3000) [rails]
puma 6.4.0 (tcp://localhost:3000) [rails]
puma 6.4.0 (tcp://localhost:3000) [rails]
There’s no way to make a distinction between different applications.
My proposal is to update the default config/puma.rb
file to tag Puma with the application name defined in config/application.rb
.
# in config/puma.rb
tag Rails.application.class.module_parent_name.downcase
This would result in a process list looking like this:
puma 6.4.0 (tcp://localhost:3000) [foo]
puma 6.4.0 (tcp://localhost:3000) [bar]
puma 6.4.0 (tcp://localhost:3000) [xxx]