Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@
<PackageVersion Include="Microsoft.Extensions.Logging.EventSource" Version="10.0.3" />
<!--/+:msbuild-conditional:noEmit -->
<PackageVersion Condition="'$(signalR)' == 'true' OR '$(signalR)' == ''" Include="ModelContextProtocol.AspNetCore" Version="1.0.0" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.Maui" Version="13.1.1-preview.1.26105.8" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.Testing" Version="13.1.1" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.Maui" Version="13.1.2-preview.1.26125.13" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.Testing" Version="13.1.2" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="CommunityToolkit.Aspire.Hosting.MailPit" Version="13.1.1" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.DevTunnels" Version="13.1.1" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.AppHost" Version="13.1.1" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.DevTunnels" Version="13.1.2" />
<PackageVersion Condition=" '$(aspire)' == 'true' OR '$(aspire)' == '' " Include="Aspire.Hosting.AppHost" Version="13.1.2" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'Sqlite' OR '$(database)' == '') " Include="CommunityToolkit.Aspire.Hosting.Sqlite" Version="13.1.1" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="Aspire.Hosting.SqlServer" Version="13.1.1" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="Aspire.Hosting.SqlServer" Version="13.1.2" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="CommunityToolkit.Aspire.Hosting.SqlServer.Extensions" Version="13.1.1" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'PostgreSQL' OR '$(database)' == '') " Include="Aspire.Hosting.PostgreSQL" Version="13.1.1" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'MySql' OR '$(database)' == '') " Include="Aspire.Hosting.MySql" Version="13.1.1" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(filesStorage)' == 'AzureBlobStorage' OR '$(filesStorage)' == '') " Include="Aspire.Hosting.Azure.Storage" Version="13.1.1" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'PostgreSQL' OR '$(database)' == '') " Include="Aspire.Hosting.PostgreSQL" Version="13.1.2" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(database)' == 'MySql' OR '$(database)' == '') " Include="Aspire.Hosting.MySql" Version="13.1.2" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(filesStorage)' == 'AzureBlobStorage' OR '$(filesStorage)' == '') " Include="Aspire.Hosting.Azure.Storage" Version="13.1.2" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '') AND ('$(filesStorage)' == 'S3' OR '$(filesStorage)' == '') " Include="CommunityToolkit.Aspire.Hosting.Minio" Version="13.1.1" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '')" Include="Aspire.Hosting.Keycloak" Version="13.1.1-preview.1.26105.8" />
<PackageVersion Condition=" ('$(aspire)' == 'true' OR '$(aspire)' == '')" Include="Aspire.Hosting.Keycloak" Version="13.1.2-preview.1.26125.13" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.3.0" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="10.3.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.0" />
Expand Down Expand Up @@ -99,7 +99,7 @@
<PackageVersion Condition=" ('$(signalR)' == 'true' OR '$(signalR)' == '') OR ('$(database)' == 'PostgreSQL' OR '$(database)' == '') OR ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="Microsoft.Extensions.AI.AzureAIInference" Version="10.0.0-preview.1.25559.3" />
<PackageVersion Condition=" ('$(signalR)' == 'true' OR '$(signalR)' == '') OR ('$(database)' == 'PostgreSQL' OR '$(database)' == '') OR ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="Microsoft.SemanticKernel.Connectors.HuggingFace" Version="1.72.0-preview" />
<PackageVersion Condition=" ('$(signalR)' == 'true' OR '$(signalR)' == '') OR ('$(database)' == 'PostgreSQL' OR '$(database)' == '') OR ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="Microsoft.SemanticKernel.Core" Version="1.72.0" />
<PackageVersion Condition=" ('$(signalR)' == 'true' OR '$(signalR)' == '') OR ('$(database)' == 'PostgreSQL' OR '$(database)' == '') OR ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="Microsoft.Agents.AI" Version="1.0.0-rc1" />
<PackageVersion Condition=" ('$(signalR)' == 'true' OR '$(signalR)' == '') OR ('$(database)' == 'PostgreSQL' OR '$(database)' == '') OR ('$(database)' == 'SqlServer' OR '$(database)' == '') " Include="Microsoft.Agents.AI" Version="1.0.0-rc2" />
<PackageVersion Condition=" ('$(database)' == 'PostgreSQL' OR '$(database)' == '') " Include="Pgvector.EntityFrameworkCore" Version="0.3.0" />
<PackageVersion Condition="'$(module)' == 'Admin' OR '$(module)' == ''" Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Condition=" '$(appInsights)' == 'true' OR '$(appInsights)' == '' " Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.6.0" />
Expand All @@ -111,8 +111,8 @@
<PackageVersion Condition=" '$(filesStorage)' == 'S3' OR '$(filesStorage)' == '' " Include="FluentStorage.AWS" Version="6.0.2" />
<PackageVersion Condition=" '$(appInsights)' == 'true' OR '$(appInsights)' == '' " Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.4.0" />
<PackageVersion Condition=" '$(appInsights)' == 'true' OR '$(appInsights)' == '' " Include="Azure.Monitor.OpenTelemetry.Profiler" Version="1.0.0-beta7" />
<PackageVersion Condition="'$(redis)' == 'true' OR '$(redis)' == ''" Include="Aspire.Hosting.Redis" Version="13.1.1" />
<PackageVersion Condition="'$(redis)' == 'true' OR '$(redis)' == ''" Include="Aspire.StackExchange.Redis" Version="13.1.1" />
<PackageVersion Condition="'$(redis)' == 'true' OR '$(redis)' == ''" Include="Aspire.Hosting.Redis" Version="13.1.2" />
<PackageVersion Condition="'$(redis)' == 'true' OR '$(redis)' == ''" Include="Aspire.StackExchange.Redis" Version="13.1.2" />
<PackageVersion Condition="'$(redis)' == 'true' OR '$(redis)' == ''" Include="ZiggyCreatures.FusionCache.Backplane.StackExchangeRedis" Version="2.5.0" />
<PackageVersion Condition="'$(redis)' == 'true' OR '$(redis)' == ''" Include="DistributedLock.Redis" Version="1.1.1" />
<PackageVersion Condition="'$(redis)' == 'true' OR '$(redis)' == ''" Include="Hangfire.Redis.StackExchange" Version="1.12.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context
{
try
{
_ = await blobStorage.ExistsAsync(settings.UserProfileImagesDir, cancellationToken);
var result = await blobStorage.ListAsync(new()
{
FolderPath = settings.UserProfileImagesDir,
MaxResults = 1
}, cancellationToken);

return HealthCheckResult.Healthy("Storage is healthy");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Aspire.AppHost.Sdk/13.1.1">
<Project Sdk="Aspire.AppHost.Sdk/13.1.2">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@

//#elif (database == "PostgreSql")
var postgresDatabase = builder.AddPostgres("postgresserver")
.WithPgAdmin(config => config.WithVolume("/var/lib/pgadmin/Boilerplate/data"))
.WithPgAdmin()
.WithV18DataVolume()
.WithOptimizedSetup()
.WithImage("pgvector/pgvector", "pg18") // pgvector supports embedded vector search.
.AddDatabase("postgresdb");

//#elif (database == "MySql")
var mySqlDatabase = builder.AddMySql("mysqlserver")
.WithPhpMyAdmin(config => config.WithVolume("/var/lib/phpMyAdmin/Boilerplate/data"))
.WithPhpMyAdmin()
.WithDataVolume()
.AddDatabase("mysqldb");
//#elif (database == "Sqlite")
var sqlite = builder.AddSqlite("sqlite", databaseFileName: "BoilerplateDb.db")
.WithSqliteWeb(config => config.WithVolume("/var/lib/sqliteweb/Boilerplate/data"));
.WithSqliteWeb();
//#endif
//#if (filesStorage == "AzureBlobStorage")
var azureBlobStorage = builder.AddAzureStorage("storage")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ public static partial class AppPlatform
[SupportedOSPlatformGuard("macOS")]
public static bool IsMacOS => IsBlazorHybrid && OperatingSystem.IsMacOS() || OperatingSystem.IsMacCatalyst() || IsIosOnMacOS;

/// <summary>
/// This is not supported yet in bit Boilerplate.
/// </summary>
public static bool IsLinux => IsBlazorHybrid && OperatingSystem.IsLinux();

[SupportedOSPlatformGuard("ios")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"ZiggyCreatures.Caching.Fusion.FusionCache": "Warning",
"StackExchange.Redis.ConnectionMultiplexer": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Information",
"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware": "None"
},
Expand Down Expand Up @@ -42,6 +43,7 @@
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"ZiggyCreatures.Caching.Fusion.FusionCache": "Warning",
"StackExchange.Redis.ConnectionMultiplexer": "Warning",
"Boilerplate.Client.Core.Services.AuthManager": "Information",
"Microsoft.EntityFrameworkCore.Database.Command": "Information",
"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware": "None"
Expand All @@ -54,6 +56,7 @@
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"ZiggyCreatures.Caching.Fusion.FusionCache": "Warning",
"StackExchange.Redis.ConnectionMultiplexer": "Warning",
"Boilerplate.Client.Core.Services.AuthManager": "Information",
"Microsoft.EntityFrameworkCore.Database.Command": "Information",
"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware": "None"
Expand All @@ -65,6 +68,7 @@
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"ZiggyCreatures.Caching.Fusion.FusionCache": "Warning",
"StackExchange.Redis.ConnectionMultiplexer": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Information",
"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware": "None"
}
Expand All @@ -80,6 +84,7 @@
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"ZiggyCreatures.Caching.Fusion.FusionCache": "Warning",
"StackExchange.Redis.ConnectionMultiplexer": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Information",
"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware": "None"
}
Expand All @@ -89,6 +94,7 @@
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"ZiggyCreatures.Caching.Fusion.FusionCache": "Warning",
"StackExchange.Redis.ConnectionMultiplexer": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Information",
"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware": "None"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Microsoft.Data.Sqlite;
//#endif
using Microsoft.Extensions.Hosting;
using Boilerplate.Tests.Features.Identity;
using Boilerplate.Server.Api.Infrastructure.Data;

namespace Boilerplate.Tests.Infrastructure;
Expand Down Expand Up @@ -38,10 +39,10 @@ public static async Task Initialize(TestContext testContext)
/// <summary>
/// Aspire.Hosting.Testing executes the complete application, including dependencies like databases,
/// closely mimicking a production environment. However, it has a limitation: backend services cannot
/// be overridden in tests if needed, unlike <see cref="AppTestServer"/> used in <see cref="IdentityTests"/>
/// and <see cref="IdentityTests"/>. The code below runs the Aspire app without the server web
/// be overridden in tests if needed, unlike <see cref="AppTestServer"/> used in <see cref="UITests"/>
/// and <see cref="IntegrationTests"/>. The code below runs the Aspire app without the server web
/// project, retrieves necessary connection strings (e.g., database connection string), and passes
/// them to <see cref="AppTestServer"/>.
/// them to <see cref="AppTestServer"/>, so you can override services in the server project.
/// </summary>
private static async Task RunAspireHost(TestContext testContext)
{
Expand Down
Loading