Question

In Ubuntu, I can run a rails server in the background as a daemon by passing in the --daemon option;

bundle exec puma -e production -b unix:///var/run/my_app.sock --daemon

However, how do I gracefully shut this daemonized process down? It's not a simple matter of crtl + c anymore :)

Was it helpful?

Solution

It is better to use puma control pumactl, it processes monitor and controller.

and then you can use it like this to stop

bundle exec pumactl -P /var/run/puma.pid stop

OR

pumactl -C unix://var/run/my_app_pumactl.sock [status|restart|halt|stop]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top