Created
May 29, 2024 09:14
-
-
Save rmehner/a411c327304c69a44b5af602a113de8b to your computer and use it in GitHub Desktop.
Rails bin/dev with overmind/hivemind support
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 sh | |
# Default to port 3000 if not specified | |
export PORT="${PORT:-3000}" | |
if overmind -v &> /dev/null; then | |
overmind start -f Procfile.dev | |
exit | |
fi | |
if hivemind -v &> /dev/null; then | |
hivemind Procfile.dev | |
exit | |
fi | |
if ! gem list foreman -i --silent; then | |
echo "Installing foreman..." | |
gem install foreman | |
fi | |
exec foreman start -f Procfile.dev "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment