Open david-acm opened 3 months ago
Was able to get everything up and running no problem.
Let me add some instructions to the README before this goes to main.
@KyleMcMaster I removed the 'Local' appsettings file and environment in this commit in favor of a docker environment variable. So, now the app behaves differently only if the 'DOTNET_RUNNING_IN_CONTAINER' env variable is set to true, which is set by either the IDE or the dotnet runtime (not sure which), no need to set it manually.
If that variable is set to true and the environment to 'Development' the app runs the DB migrations. You can also check this proposed workflow in the Run with docker section in the README.md
@KyleMcMaster @ardalis. This PR has been open for a while, I believe it has no pending issues. Should we run workflows and merge it?
@KyleMcMaster when you get a chance can you confirm this is good to 🚢 ?
@KyleMcMaster when you get a chance can you confirm this is good to 🚢 ?
Looks fine to me, I was just casually reviewing. I say :shipit:!
Fixes #1273
docker compose
starts the web application together with the database, it becomes necessary to run migrations on the newly created database as part of the program startup code. I created an extensions class that runs migrations only if both: