diff --git a/myapp.service b/myapp.service index ff766c0..f6eb0f6 100644 --- a/myapp.service +++ b/myapp.service @@ -8,10 +8,15 @@ Group=myapp WorkingDirectory=/opt/myapp Environment=RACK_ENV=production -ExecStart=/usr/bin/puma +ExecStart=/opt/myapp/bin/puma TimeoutStopSec=300 KillMode=mixed Restart=on-failure [Install] WantedBy=multi-user.target + +# Can copy this unit file into /etc/systemd/system/ +# then edit for your installation details (user, group, directory, exec, app name) +# run "sudo systemctl daemon-reload", +# then "sudo systemctl enable --now -q myapp.service"