2024-02-02 09:05:04 -06:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
if ! gem list foreman -i --silent; then
|
|
|
|
echo "Installing foreman..."
|
|
|
|
gem install foreman
|
2025-04-18 18:53:10 +05:30
|
|
|
|
|
|
|
# Add rehash for rbenv users
|
|
|
|
if command -v rbenv > /dev/null; then
|
|
|
|
echo "Running rbenv rehash..."
|
|
|
|
rbenv rehash
|
|
|
|
fi
|
2024-02-02 09:05:04 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Default to port 3000 if not specified
|
|
|
|
export PORT="${PORT:-3000}"
|
|
|
|
|
|
|
|
# Let the debug gem allow remote connections,
|
|
|
|
# but avoid loading until `debugger` is called
|
|
|
|
export RUBY_DEBUG_OPEN="true"
|
|
|
|
export RUBY_DEBUG_LAZY="true"
|
|
|
|
|
2025-04-18 18:53:10 +05:30
|
|
|
exec bundle exec foreman start -f Procfile.dev "$@"
|