Added database models
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.0.0"/>
|
||||
<PackageReference Include="Aspire.Hosting.PostgreSQL" Version="9.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
var builder = DistributedApplication.CreateBuilder(args);
|
||||
|
||||
var api = builder.AddProject<Projects.Portfolio_Api>("api");
|
||||
var postgres = builder.AddPostgres("postgres")
|
||||
.WithDataVolume("portfolio-postgres");
|
||||
|
||||
var db = postgres.AddDatabase("data");
|
||||
|
||||
var api = builder.AddProject<Projects.Portfolio_Api>("api")
|
||||
.WithReference(db)
|
||||
.WaitFor(db);
|
||||
|
||||
builder.AddProject<Projects.Portfolio_Web>("web")
|
||||
.WithReference(api)
|
||||
.WaitFor(api);
|
||||
.WaitFor(api)
|
||||
.WithExternalHttpEndpoints();
|
||||
|
||||
builder.Build().Run();
|
||||
Reference in New Issue
Block a user