.NET Aspire provides orchestration for this distributed ledger platform. The AppHost (src/Apps/Sorcha.AppHost/AppHost.cs) orchestrates 7 microservices with PostgreSQL, MongoDB, and Redis. Services use AddServiceDefaults() for consistent OpenTelemetry, health checks, and service discovery. JWT signing keys are generated once and shared across all services via environment variables.
| Resource Name | Identifier for service discovery | "redis", "tenant-service" | | WithReference | Injects connection string/URL | .WithReference(postgres) | | WithEnvironment | Pass config to service | .WithEnvironment("Key", value) | | WithExternalHttpEndpoints | Expose outside Aspire network | .WithExternalHttpEndpoints() |
| AddServiceDefaults | Shared Aspire configuration | builder.AddServiceDefaults() |
Настраивает оркестрацию .NET Aspire, обнаружение служб и телеметрию. Используйте при: добавлении служб в AppHost, настройке параметров службы по умолчанию, настройке проверок работоспособности или устранении неполадок обнаружения служб. Источник: stuartf303/sorcha.