2025-08-03 12:19:29 +02:00
|
|
|
using PresentPortal.Shared;
|
|
|
|
|
|
2025-07-06 19:15:24 +02:00
|
|
|
var builder = DistributedApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
|
|
var cache = builder.AddRedis("cache");
|
|
|
|
|
|
2025-08-03 12:50:05 +02:00
|
|
|
var keycloak = builder.AddKeycloak(ServiceNames.Keycloak, 8080)
|
|
|
|
|
.WithRealmImport(@"Resources\present-portal.json")
|
2025-08-03 12:19:29 +02:00
|
|
|
.WithDataVolume()
|
|
|
|
|
.WithExternalHttpEndpoints()
|
|
|
|
|
.WithLifetime(ContainerLifetime.Persistent);
|
|
|
|
|
|
|
|
|
|
var apiService = builder.AddProject<Projects.PresentPortal_ApiService>(ServiceNames.Api)
|
|
|
|
|
.WithReference(keycloak)
|
|
|
|
|
.WaitFor(keycloak);
|
2025-07-06 19:15:24 +02:00
|
|
|
|
|
|
|
|
builder.AddProject<Projects.PresentPortal_Web>("webfrontend")
|
|
|
|
|
.WithExternalHttpEndpoints()
|
|
|
|
|
.WithReference(cache)
|
|
|
|
|
.WaitFor(cache)
|
|
|
|
|
.WithReference(apiService)
|
|
|
|
|
.WaitFor(apiService);
|
|
|
|
|
|
|
|
|
|
builder.Build().Run();
|