Skip to content

Instantly share code, notes, and snippets.

@rmehner
Created May 29, 2024 09:14
Show Gist options
  • Save rmehner/a411c327304c69a44b5af602a113de8b to your computer and use it in GitHub Desktop.
Save rmehner/a411c327304c69a44b5af602a113de8b to your computer and use it in GitHub Desktop.
Rails bin/dev with overmind/hivemind support
#!/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