Scaffold some identity stuff and switch to postgres
This commit is contained in:
@@ -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();
|
||||
Reference in New Issue
Block a user