use foreman

This commit is contained in:
Christophe Robillard 2025-12-01 10:16:33 +01:00
parent 9f40829f20
commit 976ade253c
2 changed files with 13 additions and 2 deletions

2
Procfile.dev Normal file
View file

@ -0,0 +1,2 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
css: yarn build:css --watch

13
bin/dev
View file

@ -1,2 +1,11 @@
#!/usr/bin/env ruby
exec "./bin/rails", "server", *ARGV
#!/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 --env /dev/null "$@"