Created
May 16, 2018 20:17
-
-
Save eknowlton/163dda2f886a50c28f6dc99078ca188c to your computer and use it in GitHub Desktop.
Rails 5 Server Script, with rbenv
This file contains 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
#!/usr/bin/env bash | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
path="$(dirname `pwd`)" | |
if [ -f ../puma.pid ]; then | |
kill -9 $(cat "../puma.pid") | |
rm -rf ../puma.pid | |
fi | |
if [ -f ../puma.sock ]; then | |
rm -rf ../puma.sock | |
fi | |
bundle exec puma -e production -b "unix://$path/puma.sock" --pidfile "$path/puma.pid" -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment