Repository navigation
Chore/compose migrations - #93
Merged
Merged
Conversation
added 4 commits
October 31, 2026 21:50
Matches the EF Core 10.0.14 packages and removes the warning that the tools are older than the runtime.
The bundle stage installs dotnet-ef 10.0.14 and builds a migration bundle from the API project. The migrate stage holds only the bundle on the ASP.NET runtime image, runs as the app user, and takes the connection string as --connection. The runtime stage stays last, so the default build target is still the API.
mssql gets a sqlcmd healthcheck. The migrate service runs the EF Core migration bundle once SQL Server answers, and the API starts after migrate has exited successfully. The connection string is defined once and shared by both services. docker compose up now works on an empty volume, also after docker compose down -v.
development.md describes the migrate service and the order Compose starts the services in, how to apply a new migration while the stack runs, the shorter reset steps and the migrate image. The README quick start no longer needs the .NET SDK or a manual migration step. configuration.md and architecture.md mention the migrate service.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
docker compose upcreate and migrate the database, so a fresh volume works without a manualdotnet ef database update.api/Dockerfilegets abundlestage that builds an EF Core migration bundle with dotnet-ef 10.0.14, and amigratestage that holds only the bundle on the ASP.NET runtime image.runtimestays the default targetmssqlgets asqlcmdhealthcheckmigrateservice runs the bundle once SQL Server is healthy, andapiwaits for it to exit successfullycompose.ymland shared byapiandmigratedotnet-tools.jsonmoves dotnet-ef to 10.0.14 to match the EF Core packagesdocs/development.md,docs/configuration.md,docs/architecture.mdand the README quick start describe the new flowChecked under a separate Compose project with an empty volume:
migrateapplied both migrations, the API answeredGET /v1/locationswith 200, and a second run reported the database already up to date.