Skip to content

Instantly share code, notes, and snippets.

@corny
Created September 24, 2017 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corny/74bf8a8a42b4bec325669c34bae61306 to your computer and use it in GitHub Desktop.
Save corny/74bf8a8a42b4bec325669c34bae61306 to your computer and use it in GitHub Desktop.
Puma mit Socket Activation
[Unit]
Description=Puma HTTP Server
After=network.target
Requires=puma.socket
[Service]
User=wiki
# Helpful for debugging socket activation, etc.
Environment=PUMA_DEBUG=1
ExecStart=/srv/wiki/current/bin/puma \
-e production \
--dir /srv/wiki/current \
--bind unix:///srv/wiki/shared/tmp/sockets/puma.sock
Restart=always
[Install]
WantedBy=multi-user.target
[Unit]
Description=Puma HTTP Server Accept Sockets
[Socket]
SocketUser=wiki
ListenStream=80
# Socket options matching Puma defaults
NoDelay=true
ReusePort=true
Backlog=256
[Install]
WantedBy=sockets.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment