marlen271
marlen271

Reputation: 33

How to auto-run db:migrate after docker app is deployed?

I specified rails db:setup rails db:migrate in my entrypoint.sh file. It runs locally, but heroku says "relation todos does not exist".

I then only left rails db:migrate since I do not have permissions to run rails db:setup on heroku, but the problem persists.

Is there any way to automatically run migrations on heroku in docker app?

Upvotes: 0

Views: 739

Answers (1)

Veridian Dynamics
Veridian Dynamics

Reputation: 1406

Specifying this in the heroku.yml configuration file listed here: https://devcenter.heroku.com/articles/build-docker-images-heroku-yml

Fixed their problem.

Upvotes: 1

Related Questions