File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -euo pipefail # Use strict-mode in based to ensure errors are surfaced early
23
3- rails db:prepare
4- rdbg -n -o -c -- bin/rails s -p 3009 -b ' 0.0.0.0'
4+ # Check if bundle install needs to be run
5+ bundle check > /dev/null 2>&1 || bundle install --jobs " ${BUNDLE_JOBS:- 4} "
6+
7+ # Check if yarn install needs to be run
8+ if [ -f package.json ] && command -v yarn > /dev/null 2>&1 ; then
9+ yarn install --check-files --frozen-lockfile || yarn install --check-files
10+ fi
11+
12+ # Prepare the database
13+ bundle exec rails db:prepare
14+
15+ exec rdbg -n -o -c -- bundle exec rails s -p 3009 -b ' 0.0.0.0'
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -euo pipefail # Use strict-mode in based to ensure errors are surfaced early
23
3- rails db:prepare
4- rails server --port 3009 --binding 0.0.0.0
4+ # Check if bundle install needs to be run
5+ bundle check > /dev/null 2>&1 || bundle install --jobs " ${BUNDLE_JOBS:- 4} "
6+
7+ # Check if yarn install needs to be run
8+ if [ -f package.json ] && command -v yarn > /dev/null 2>&1 ; then
9+ yarn install --check-files --frozen-lockfile || yarn install --check-files
10+ fi
11+
12+ # Prepare the database
13+ bundle exec rails db:prepare
14+
15+ exec bundle exec rails server --port 3009 --binding 0.0.0.0
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ services:
2626 condition : service_healthy
2727 volumes :
2828 - .:/app
29+ - bundle-data:/usr/local/bundle
30+ - node-modules:/app/node_modules
2931 # This is here to avoid rails finding stale pid-files in tmp/pids and then
3032 # thinking it is already running:
3133 - type : tmpfs
@@ -53,3 +55,5 @@ services:
5355
5456volumes :
5557 postgres-data :
58+ bundle-data :
59+ node-modules :
You can’t perform that action at this time.
0 commit comments