-
-
Save rrichards/9c4b9039957ab47d69bd6d398af82b02 to your computer and use it in GitHub Desktop.
Puma upstart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "project server config" | |
pre-start script | |
mkdir -p /var/log/puma | |
chown deploy. /var/log/puma | |
mkdir -p /var/run/puma | |
chown deploy. /var/run/puma | |
end script | |
start on runlevel [23] | |
stop on shutdown | |
respawn | |
script | |
exec /bin/bash <<'EOT' | |
# export RAILS_ENV=production | |
# export APP_HOST=http:// | |
# Some environment variables... | |
exec sudo -E -u deploy sh -c "cd /var/www/project/current && RAILS_ENV=production bundle exec puma -C config/puma.rb" | |
EOT | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment