Sylin.Koan.Orchestration.Renderers.Connector.Compose
0.17.0
dotnet add package Sylin.Koan.Orchestration.Renderers.Connector.Compose --version 0.17.0
NuGet\Install-Package Sylin.Koan.Orchestration.Renderers.Connector.Compose -Version 0.17.0
<PackageReference Include="Sylin.Koan.Orchestration.Renderers.Connector.Compose" Version="0.17.0" />
<PackageVersion Include="Sylin.Koan.Orchestration.Renderers.Connector.Compose" Version="0.17.0" />
<PackageReference Include="Sylin.Koan.Orchestration.Renderers.Connector.Compose" />
paket add Sylin.Koan.Orchestration.Renderers.Connector.Compose --version 0.17.0
#r "nuget: Sylin.Koan.Orchestration.Renderers.Connector.Compose, 0.17.0"
#:package Sylin.Koan.Orchestration.Renderers.Connector.Compose@0.17.0
#addin nuget:?package=Sylin.Koan.Orchestration.Renderers.Connector.Compose&version=0.17.0
#tool nuget:?package=Sylin.Koan.Orchestration.Renderers.Connector.Compose&version=0.17.0
Koan.Orchestration.Renderers.Connector.Compose
✅ Validated against host-mount discovery, healthcheck rendering, and network defaults on 2025-09-29. See
TECHNICAL.mdfor component breakdown and edge-case coverage.
Exporter that turns a Koan.Orchestration.Models.Plan into a Docker Compose v2 manifest used by the Koan CLI and orchestration tooling.
Capabilities
- Declares
internal/externalnetworks and attaches services appropriately (app on both; dependencies on internal only). - Injects persistence mounts based on
HostMountAttributeor image heuristics (Postgres, Mongo, Redis, SQL Server, Weaviate, Ollama). - Emits healthchecks when
Planservices provide an HTTP endpoint, falling back to TCP probing when curl/wget are unavailable. - Adds named volumes automatically for Ci profile; bind-mounts
./Data/{service}for Local/Staging; skips auto-mounting in Prod. - Generates optional
buildblocks for the app (api) when a project file is present, using the repo root as context.
Quick verification
# Render compose for the current project
dotnet run --project src/Koan.Orchestration.Cli -- export compose
# Inspect the generated YAML
Get-Content .Koan/compose.yml
Programmatic usage
using Koan.Orchestration.Renderers.Connector.Compose;
using Koan.Orchestration.Models;
Plan plan = Planner.Build(Profile.Local); // or your custom discovery flow
var exporter = new ComposeExporter();
await exporter.GenerateAsync(plan, Profile.Local, ".Koan/compose.yml");
Profiledrives persistence heuristics (bind mounts vs named volumes vs none).- The exporter writes directly to
outPath; it does not return an in-memory representation. ExporterCapabilitiesadvertises readiness probe support so callers know healthchecks are emitted.
Tips & edge cases
- Ensure services include container images (
ServiceSpec.Image); missing images cause empty entries and Compose will fail to boot. - Healthchecks rely on curl/wget/bash inside the container—supply lightweight base images when possible.
- If reflection-based host mount discovery fails (e.g., missing optional assembly), the exporter falls back to heuristic mounts or none at all; add explicit entries to
ServiceSpec.Volumesto override. - To avoid bind mounts in Local profile, set your own volumes before handing the plan to the exporter.
Related docs
Koan.Orchestration.Cli– CLI front-end invoking the exporter.Koan.Orchestration.Connector.Docker,Koan.Orchestration.Connector.Podman– providers consuming the generated Compose files./docs/engineering/index.md,/docs/architecture/principles.md– orchestration design principles.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Sylin.Koan.Core (>= 0.17.0 && < 0.18.0)
- Sylin.Koan.Orchestration.Abstractions (>= 0.17.0 && < 0.18.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sylin.Koan.Orchestration.Renderers.Connector.Compose:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Orchestration.Cli.Core
Core orchestration logic for the Koan CLI: app discovery, manifest assembly, compose generation, and provider election. Shared with the CLI front-end (Koan.Orchestration.Cli) and consumable by tooling that builds on the same primitives. |
GitHub repositories
This package is not used by any popular GitHub repositories.
See release notes: https://github.com/sylin-labs/Koan-framework/releases