After lesson 2.9.8, the Kladde runs from your own image in Azure. But not every Kladde is meant to go to Azure. A small office may have a server of its own in the basement, and there is no azd and no Container Apps there, but there is Docker. For exactly this case there is Docker Compose: a file that describes which containers belong together, and a command that starts them all. In this lesson you write that file once by hand and have it written once by the Aspire AppHost from lesson 2.9.3. Then you compare them and decide what applies where.
What Compose is for
In lesson 2.9.2 you connected two containers by hand: you created a network, attached the SQL Server container to it, wrote an .env
file, and started the Kladde with five options. That works, but it exists only in your command history. Whoever wants to start the Kladde
on another machine has to retype everything, in the right order.
Compose writes all of that into one file, compose.yaml, and starts it with one command. The file lives in the repository, and everybody
who has Docker gets the same environment. Docker Desktop brings Compose along as docker compose, and Podman can read the same files.
You already know Aspire for this. The AppHost from lesson 2.9.3 does something similar locally, only more powerfully. But it needs the .NET SDK and doesn't run as a service on a server. Compose, on the other hand, needs only Docker.