Add orchestration enrollment samples

This commit is contained in:
fiodarsazanavets
2026-02-07 12:16:49 +00:00
parent e8d6decd1a
commit 21f54adbcc
158 changed files with 121203 additions and 1 deletions
@@ -0,0 +1,18 @@
var builder = DistributedApplication.CreateBuilder(args);
var sql = builder.AddSqlServer("sql").WithLifetime(ContainerLifetime.Persistent);
var sqldb = sql.AddDatabase("sqldb");
var apiService = builder.AddProject<Projects.OnlineShop_ApiService>("apiservice")
.WithHttpHealthCheck("/health")
.WaitFor(sqldb)
.WithReference(sqldb);
builder
.AddProject<Projects.OnlineShop_Web>("webfrontend")
.WithExternalHttpEndpoints()
.WithHttpHealthCheck("/health")
.WithReference(apiService)
.WaitFor(apiService);
builder.Build().Run();
@@ -0,0 +1,21 @@
<Project Sdk="Aspire.AppHost.Sdk/13.0.1">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>2f2ef062-99af-422f-b6a5-1094759553e7</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting.Redis" Version="13.0.1" />
<PackageReference Include="Aspire.Hosting.SqlServer" Version="13.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OnlineShop.ApiService\OnlineShop.ApiService.csproj" />
<ProjectReference Include="..\OnlineShop.Web\OnlineShop.Web.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17233;http://localhost:15066",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21152",
"ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "https://localhost:23107",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22167"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15066",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19114",
"ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "http://localhost:18044",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20232"
}
}
}
}
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}