Skip to content

Instantly share code, notes, and snippets.

@Vchekryzhov
Created June 29, 2021 18:16
Show Gist options
  • Save Vchekryzhov/a5a236c16bf317df959fbd6611afd1da to your computer and use it in GitHub Desktop.
Save Vchekryzhov/a5a236c16bf317df959fbd6611afd1da to your computer and use it in GitHub Desktop.
Rails puma user service
#~/.config/systemd/user/puma.service
#systemctl --user status|start|stop puma
[Unit]
Description=Puma HTTP Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/home/www/PROJET_NAME/current
Environment=RAILS_ENV=production
ExecStart=/home/${USER}/.rbenv/bin/rbenv exec bundle exec puma
Restart=always
RestartSec=5
PIDFile=/home/www/PROJET_NAME/shared/tmp/pids/puma.pid
KillMode=process
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment