Base solution for your next web application
Open Closed

Migrations in Docker #3426


User avatar
0
dannyw created

So before I begin the fight to get EF migrations working in a production docker environment I thought I'd ask to see if there are any recommendations on doing this:

My scenario is docker images are built by my CI (GitLab) pushed to our docker registry and then automatically deployed to a "Dev" environment. The docker image simply runs Web.Host which of course when it starts complains that the database is not initialised. Since the "Dev" environment is not easy accessible it makes it hard to run the initial database migrations and the Migrator project to add the initial data.

Do you have any recommendations around around this?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I personally dont have much info about docker but why cant you run migrator tool ? If you modify it to run migrations on startup without getting any parameter it can work. At least i think like that.

    If you can explain your case a little bit more, maybe we can find a way for you.

    Thanks.