Skip to content

Instantly share code, notes, and snippets.

@toppa
Forked from ordoghl/pumaapp.conf
Created April 19, 2016 13:05
Show Gist options
  • Save toppa/12a560c838500689991c08759bce3871 to your computer and use it in GitHub Desktop.
Save toppa/12a560c838500689991c08759bce3871 to your computer and use it in GitHub Desktop.
Ubuntu upstart job for Puma w/ rbenv and application deployed to appuser home directory.
# /etc/init/puma.conf - Puma config
description "Puma App Service"
start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345])
stop on (runlevel [!2345])
setuid appuser
setgid appuser
respawn
respawn limit 3 30
env HOME=/home/appuser
env PATH=/home/appuser/.rbenv/shims:/home/appuser/.rbenv/bin:/usr/local/bin:/usr/bin:/bin
chdir /home/appuser/app/current
exec /home/appuser/.rbenv/shims/puma -C /home/appuser/app/current/config/puma.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment