Skip to content

Instantly share code, notes, and snippets.

@rafamoreira
Created July 1, 2019 10:42
Show Gist options
  • Save rafamoreira/12e402e08c35a4141e96c340de2e3654 to your computer and use it in GitHub Desktop.
Save rafamoreira/12e402e08c35a4141e96c340de2e3654 to your computer and use it in GitHub Desktop.
puma systemd unit
[Unit]
Description=Puma Rails Server
After=network.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/home/deploy/apps/app/current
ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/apps/app/shared/puma.rb
ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/apps/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