How do you call db:seed on AWS Elastic Beanstalk apps?

后端 未结 5 713
挽巷
挽巷 2021-02-07 14:18

I know that you can run tasks as part of each deploy, but I only want to bootstrap the database once.

5条回答
  •  鱼传尺愫
    2021-02-07 14:39

    It's a while since the question was asked, so perhaps you've figured it out. Anyway, you can add a file called (for instance) seed.config in the .beanstalk folder. Enter something like this and your seeds will be run:

    container_commands:
      01seed:
        command: rake db:seed
    

提交回复
热议问题