Skip to content

Commit 5cb88ef

Browse files
committed
Enable Procfile based bin/dev.
1 parent fae5419 commit 5cb88ef

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Procfile.dev

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
web: bin/rails server
2+
css: bin/rails tailwindcss:watch

bin/dev

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
#!/usr/bin/env ruby
2-
exec "./bin/rails", "server", *ARGV
1+
#!/usr/bin/env sh
2+
3+
if ! gem list foreman -i --silent; then
4+
echo "Installing foreman..."
5+
gem install foreman
6+
fi
7+
8+
# Default to port 3000 if not specified
9+
export PORT="${PORT:-3000}"
10+
11+
# Let the debug gem allow remote connections,
12+
# but avoid loading until `debugger` is called
13+
export RUBY_DEBUG_OPEN="true"
14+
export RUBY_DEBUG_LAZY="true"
15+
16+
exec foreman start -f Procfile.dev "$@"

0 commit comments

Comments
 (0)