-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from consuldemocracy/puma_socket_activation
Enable graceful appication restarts
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[Unit] | ||
Description=Puma HTTP Server Accept Sockets for {{ app_name }} ({{ env }}) | ||
|
||
[Socket] | ||
ListenStream={{ shared_dir }}/tmp/sockets/puma.sock | ||
|
||
# Don't let systemd accept the request, wait for Puma to do that. | ||
# Systemd will start the puma service upon first request if it wasn't started. | ||
# | ||
# You might also want to set your Nginx upstream to have a fail_timeout large enough to accomodate your app's | ||
# startup time. | ||
Accept=no | ||
|
||
ReusePort=true | ||
Backlog=1024 | ||
|
||
SyslogIdentifier=puma_socket | ||
|
||
[Install] | ||
WantedBy=sockets.target |