I want to migrate an Asp.Net Core app on Kubernetes. Actually, inside the Program.cs
class, there is the code that executes the migrations in the following way:
context.Database.Migrate();
I would like to remove this from the application startup and create a Docker image to use as the base image for the application init container.
Any suggestion?
You have at least two options to run the migrations separately from the application.
Hope it helps, it doesn't describe how to run either option before your app but I think you can use the kubernetes into container to run any container before the others.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.