Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions bin/conductor-setup
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,17 @@ if [ -d "$CONDUCTOR_ROOT_PATH/.bundle" ]; then
ln -sf "$CONDUCTOR_ROOT_PATH/.bundle" .bundle
fi

# Install deps before bin/setup so they're available when Rails env loads
# Install gems before bin/setup so they're available when it loads the Rails
# env (bin/setup requires config/environment before it runs bundle itself).
# npm packages aren't needed to boot Rails, so leave `npm ci` to bin/setup
# instead of running it twice.
echo ""
echo "== Installing dependencies =="
bundle check > /dev/null 2>&1 || bundle install
npm ci

# Run full setup (database drop, create, migrate, seed)
bin/setup --skip-server
# Run full setup (database drop, create, migrate, seed). Conductor workspaces
# are always dev, so load the full dev sample dataset via --seed-dev.
bin/setup --skip-server --seed-dev

PORT=${WORKSPACE_PORT:-${PORT:-3000}}
echo ""
Expand Down
8 changes: 7 additions & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ FileUtils.chdir APP_ROOT do

puts "\n== Running Rails migrations and seeds =="
system! "bin/rails db:migrate"
system! "bin/rails db:seed"
# --seed-dev loads the full dev sample dataset (db:seed:dev chains the base
# db:seed first); plain db:seed stays the default for CI and lean setups.
if ARGV.include?("--seed-dev")
system! "bin/rails db:seed:dev"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: db:seed:dev chains the base db:seed first, so this branch swaps the call rather than running both. Plain db:seed stays the default so CI and production-style setups skip the dev sample data.

else
system! "bin/rails db:seed"
end

puts "\n== Preparing test database =="
system! "RAILS_ENV=test bin/rails db:drop"
Expand Down