Added Aspire
This commit is contained in:
13
Lutra/Lutra.AppHost/AppHost.cs
Normal file
13
Lutra/Lutra.AppHost/AppHost.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
var builder = DistributedApplication.CreateBuilder(args);
|
||||
|
||||
var sql = builder.AddSqlServer("sql")
|
||||
.WithLifetime(ContainerLifetime.Persistent);
|
||||
|
||||
var db = sql.AddDatabase("database", "Lutra");
|
||||
|
||||
var apiService = builder.AddProject<Projects.Lutra_API>("apiservice")
|
||||
.WithHttpHealthCheck("/health")
|
||||
.WithReference(db)
|
||||
.WaitFor(db);
|
||||
|
||||
builder.Build().Run();
|
||||
22
Lutra/Lutra.AppHost/Lutra.AppHost.csproj
Normal file
22
Lutra/Lutra.AppHost/Lutra.AppHost.csproj
Normal file
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.0" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UserSecretsId>cb3bf793-12ac-4e3d-9aeb-c2e3cb36a9fe</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.1.0" />
|
||||
<PackageReference Include="Aspire.Hosting.SqlServer" Version="13.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Lutra.API\Lutra.API.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
29
Lutra/Lutra.AppHost/Properties/launchSettings.json
Normal file
29
Lutra/Lutra.AppHost/Properties/launchSettings.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:17126;http://localhost:15299",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"DOTNET_ENVIRONMENT": "Development",
|
||||
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21049",
|
||||
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22271"
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:15299",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"DOTNET_ENVIRONMENT": "Development",
|
||||
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19176",
|
||||
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20117"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Lutra/Lutra.AppHost/appsettings.Development.json
Normal file
8
Lutra/Lutra.AppHost/appsettings.Development.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Lutra/Lutra.AppHost/appsettings.json
Normal file
9
Lutra/Lutra.AppHost/appsettings.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning",
|
||||
"Aspire.Hosting.Dcp": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user