Skip to content

Instantly share code, notes, and snippets.

@masudcsesust04
Forked from arteezy/puma.service
Created July 8, 2021 16:00
Show Gist options
  • Save masudcsesust04/3df9bae1b3ce81e355b7247366cb06a9 to your computer and use it in GitHub Desktop.
Save masudcsesust04/3df9bae1b3ce81e355b7247366cb06a9 to your computer and use it in GitHub Desktop.
Manage Puma with systemd and rbenv
[Unit]
Description=Puma Rails Server
After=network.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/home/deploy/app/current
ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/app/shared/config/puma.rb
ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop
TimeoutSec=15
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment