I've been reading the documentation to use a postgres database from my asp.net core project here:
https://learn.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
I've been running the commands:
dotnet ef database add InitialMigration dotnet ef database update
To define my local database. My question now is, how do I go about actually getting this ready for production? I'm thinking I'd like to wrap up the database creation in a docker container, where I can just supply the connection string, and when the container runs, it will create the database. I'm not really sure on how I go about this as the docs don't really make it clear what I need to be able to run the above commands. Do I actually need my uncompiled code in the container, or can I just add the migration and copy over the migration files at build time? If I do that, how do I go about supplying the connection string at runtime?