Scaffold some identity stuff and switch to postgres

This commit is contained in:
2025-08-01 15:48:20 +02:00
parent 164aa79dae
commit f74e727a6f
40 changed files with 32156 additions and 42 deletions

View File

@@ -1,14 +1,31 @@
using Microsoft.Extensions.Hosting;
var builder = DistributedApplication.CreateBuilder(args);
var cache = builder.AddRedis("cache");
var apiService = builder.AddProject<Projects.PresentPortal_ApiService>("apiservice");
IResourceBuilder<PostgresServerResource> postgresBuilder = builder.AddPostgres("postgres")
.WithLifetime(ContainerLifetime.Persistent)
.WithDataVolume();
if (builder.Environment.IsDevelopment())
{
postgresBuilder = postgresBuilder
.WithPgWeb();
}
IResourceBuilder<PostgresDatabaseResource> postgres = postgresBuilder
.AddDatabase("presentportal");
var apiService = builder.AddProject<Projects.PresentPortal_ApiService>("apiservice")
.WithReference(postgres)
.WaitFor(postgres);
builder.AddProject<Projects.PresentPortal_Web>("webfrontend")
.WithExternalHttpEndpoints()
.WithReference(cache)
.WaitFor(cache)
.WithReference(apiService)
.WaitFor(apiService);
.WithExternalHttpEndpoints()
.WithReference(cache)
.WaitFor(cache)
.WithReference(apiService)
.WaitFor(apiService);
builder.Build().Run();