Skip to content

Chore/compose migrations - #93

Merged
doccelick merged 4 commits into
mainfrom
chore/compose-migrations
Oct 31, 2026
Merged

doccelick merged 4 commits into
mainfrom
chore/compose-migrations

Conversation

@doccelick

Copy link
Copy Markdown
Owner

Makes docker compose up create and migrate the database, so a fresh volume works without a manual dotnet ef database update.

  • api/Dockerfile gets a bundle stage that builds an EF Core migration bundle with dotnet-ef 10.0.14, and a migrate stage that holds only the bundle on the ASP.NET runtime image. runtime stays the default target
  • mssql gets a sqlcmd healthcheck
  • A one-shot migrate service runs the bundle once SQL Server is healthy, and api waits for it to exit successfully
  • The connection string is defined once in compose.yml and shared by api and migrate
  • dotnet-tools.json moves dotnet-ef to 10.0.14 to match the EF Core packages
  • docs/development.md, docs/configuration.md, docs/architecture.md and the README quick start describe the new flow

Checked under a separate Compose project with an empty volume: migrate applied both migrations, the API answered GET /v1/locations with 200, and a second run reported the database already up to date.

Anders Evjen Bakke 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.
@doccelick doccelick added this to the 4 - Admin auth milestone Oct 31, 2026
@doccelick doccelick self-assigned this Oct 31, 2026
@doccelick doccelick added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 31, 2026
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@doccelick
doccelick merged commit 7107535 into main Oct 31, 2026
7 checks passed
@doccelick
doccelick deleted the chore/compose-migrations branch October 31, 2026 21:11
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Tides backlog Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant