Enabled systemd socket activation (PR #942)

With this [configuration](https://github.com/puma/puma/blob/master/docs/systemd.md) puma automatically binds to all systemd activated sockets. With socket activation systemd opens the listening socket(s) in advance and provides them to the Puma master process on startup. This keeps listening sockets open across puma restarts and achieves graceful restarts.
This commit is contained in:
kidhab 2022-04-25 12:41:40 +02:00 committed by GitHub
parent e8a28d7fee
commit 216fb9b3cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,9 @@ threads threads_count, threads_count
#
port ENV.fetch("PORT") { 3000 }
# Bind automatically to all systemd activated sockets
bind_to_activated_sockets
# Specifies the `environment` that Puma will run in.
#
environment ENV.fetch("RAILS_ENV") { "development" }