diff options
author | Matt Jankowski <matt@jankowski.online> | 2024-03-02 13:31:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 18:31:43 +0000 |
commit | 64b8ba36bb1ac97b7c6dc0b259682a9a4f02524f (patch) | |
tree | 5bbc4e3f014e03e4a8f9017bb73c43c07148db67 /bin | |
parent | b6b94c971fa7747aeb7d7588319429d6a5d856c9 (diff) |
Add `bin/dev` script to launch foreman (#28242)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dev | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/dev b/bin/dev new file mode 100755 index 00000000000..9b1d3ac6fcc --- /dev/null +++ b/bin/dev @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# Default to port 3000 if not specified +export PORT="${PORT:-3000}" + +# Get around our boot.rb ENV check +export RAILS_ENV="${RAILS_ENV:-development}" + +if command -v overmind &> /dev/null +then + overmind start -f Procfile.dev "$@" + exit $? +fi + +if gem list --no-installed --exact --silent foreman; then + echo "Installing foreman..." + gem install foreman +fi + +foreman start -f Procfile.dev "$@" |