Skip to content

Commit

Permalink
Added support for foreman and bin/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yatish27 committed Apr 19, 2024
1 parent 1962fc3 commit 5cf77e4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ group :development do
gem "rubocop-rails", ">= 2.22.0", require: false
gem "web-console"
end

gem "foreman", "~> 0.88.1"
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ GEM
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
foreman (0.88.1)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.4)
Expand Down Expand Up @@ -285,6 +286,7 @@ DEPENDENCIES
debug
dotenv (>= 3.0)
factory_bot_rails
foreman (~> 0.88.1)
jbuilder
letter_opener
pg (~> 1.1)
Expand Down
2 changes: 2 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
vite: bin/vite dev --clobber
11 changes: 11 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env sh

if ! gem list foreman -i --silent; 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 "$@"

0 comments on commit 5cf77e4

Please sign in to comment.