seuros / capistrano-puma

Puma integration for Capistrano
https://github.com/seuros/capistrano-puma
MIT License
615 stars 299 forks source link

deploy user needs sudo access to use systemd #326

Closed ivandenysov closed 3 years ago

ivandenysov commented 3 years ago

Hi.

Is it possible to use systemd to manage puma without giving sudo access to the user? Are there any technical limitations that prevent us from doing that?

seuros commented 3 years ago

You can give access to user for sudo to only a very specific command/argument. with /etc/sudoers

ivan  ALL=(root)  /bin/systemctl

If you run the app in with your user/group , systemd should be able to stop/run it without sudo.