문제

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 :)

도움이 되었습니까?

해결책

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]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top