1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Additional docs/systemd refinements (3) (#1373)

* docs/systemd: consistent <WD> replacement messaging

* Note that socket activation doesn't work on jruby

github: puma/puma#1367
This commit is contained in:
David Kellum 2017-07-19 08:43:45 -07:00 committed by Nate Berkopec
parent b494bdafad
commit 31b02825d3

View file

@ -64,10 +64,16 @@ the listening socket(s) in advance and provides them to the puma
master process on startup. Among other advantages, this keeps
listening sockets open across puma restarts and achieves graceful
restarts, including when upgraded puma, and is compatible with both
clustered mode and application preload. To use socket activation,
configure one or more `ListenStream` sockets in a companion `*.socket`
systemd config file. Here is a sample puma.socket, matching the ports
used in the above puma.service:
clustered mode and application preload.
**Note:** Socket activation doesn't currently work on jruby. This is
tracked in [#1367].
To use socket activation, configure one or more `ListenStream` sockets
in a companion `*.socket` unit file. Also uncomment the associated
`Requires` directive for the socket unit in the service file (see
above.) Here is a sample puma.socket, matching the ports used in the
above puma.service:
~~~~ ini
[Unit]
@ -213,11 +219,11 @@ Type=forking
WorkingDirectory=
# The command to start Puma
# Replace "<WD>" below, with the application root or working directory
# (replace "<WD>" below)
ExecStart=bundle exec puma -C <WD>/shared/puma.rb --daemon
# The command to stop Puma
# Replace "<WD>" below
# (replace "<WD>" below)
ExecStop=bundle exec pumactl -S <WD>/shared/tmp/pids/puma.state stop
# Path to PID file so that systemd knows which is the master process
@ -253,3 +259,4 @@ cap $stage puma:stop --dry-run
~~~~
[Restart]: https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=
[#1367]: https://github.com/puma/puma/issues/1367