Skip to content

Commit

Permalink
[DX] Prefer overmind to foreman
Browse files Browse the repository at this point in the history
If available, use overmind. Fallback to foreman otherwise (windows,
preference etc).

Overmind is more stable, provides various featues as it's based on tmux,
makes it trivial to stop/restart to/attach to processes (that you
stopped with binding.irb, for example), so over all I feel like it's a
better DX.

Foreman is fine too (it's part of Omakase Rails now), so you can't
really go wrong using it either
  • Loading branch information
trinitytakei committed Jul 1, 2024
1 parent eb57342 commit 194265a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env sh

if gem list --no-installed --exact --silent foreman; then
echo "Installing foreman..."
gem install foreman
fi

# Default to port 3000 if not specified
export PORT="${PORT:-3000}"

exec foreman start -f Procfile.dev "$@"
if command -v overmind > /dev/null 2>&1; then
exec overmind start -f Procfile.dev "$@"
else
if gem list --no-installed --exact --silent foreman; then
echo "Installing foreman..."
gem install foreman
fi
exec foreman start -f Procfile.dev "$@"
fi

0 comments on commit 194265a

Please sign in to comment.