Skip to content

Commit

Permalink
Fix db seed error
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasUCSB committed Dec 11, 2024
1 parent 6d745df commit c6f198a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .ebextensions/20_seed_db.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
container_commands:
seed_db:
command: 'export HOME=/root; rake db:seed'
commands:
20_run_seeds:
command: |
cd /var/app/current
bundle exec rake db:seed >> /var/log/seed.log 2>&1
leader_only: true
8 changes: 8 additions & 0 deletions lib/tasks/seed.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace :db do
desc "Run db:seed"
task seed: :environment do
puts "Running db:seed..."
Rake::Task["db:seed"].invoke
puts "db:seed completed."
end
end

0 comments on commit c6f198a

Please sign in to comment.