I know that you can run tasks as part of each deploy, but I only want to bootstrap the database once.
Kristian's answer is close, but you should also add:
container_commands:
seeddb:
command: 'export HOME=/root; rake db:seed'
leader_only: true
So that the DB is only seeded from 1 EC2 instance, rather than all of them at the same time. Depending on your EB deployment/version, the export HOME
may or may not be needed.