Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Orchestration with the AppHost: Resources, WithReference, WaitFor, Parameters and Persistent Containers
In the AppHost every part is a resource: a project, a container or an executable; WithReference passes connection strings and connection properties as environment variables, WaitFor waits for health and WaitForCompletion for a job to exit with code 0. The post adds SQL Server, Redis and a migration worker to Bookstore and shows, with real output, the trap of a throwing worker exiting with code 0 and starting the API, secret parameters and persistent containers.
The Solution Skeleton: Aspire AppHost, ServiceDefaults and a One-Command Local Environment
An Aspire AppHost describes Bookstore's five services, a SQL Server database per service, Redis, RabbitMQ and Keycloak in one C# file and runs them with a single command; ServiceDefaults adds telemetry, health checks, service discovery and resilience to every service with one line. We run migrations as a separate resource by starting the service binary with --migrate and wait for it with WaitForCompletion; real start times show why WaitFor isn't enough.