Files
PresentPortal/PresentPortal.AppHost/Program.cs
2025-08-03 12:50:05 +02:00

24 lines
716 B
C#

using PresentPortal.Shared;
var builder = DistributedApplication.CreateBuilder(args);
var cache = builder.AddRedis("cache");
var keycloak = builder.AddKeycloak(ServiceNames.Keycloak, 8080)
.WithRealmImport(@"Resources\present-portal.json")
.WithDataVolume()
.WithExternalHttpEndpoints()
.WithLifetime(ContainerLifetime.Persistent);
var apiService = builder.AddProject<Projects.PresentPortal_ApiService>(ServiceNames.Api)
.WithReference(keycloak)
.WaitFor(keycloak);
builder.AddProject<Projects.PresentPortal_Web>("webfrontend")
.WithExternalHttpEndpoints()
.WithReference(cache)
.WaitFor(cache)
.WithReference(apiService)
.WaitFor(apiService);
builder.Build().Run();