2024-12-28 17:01:18 +01:00
|
|
|
using Vegasco.Server.AppHost.Shared;
|
|
|
|
|
|
2025-06-12 17:43:22 +02:00
|
|
|
IDistributedApplicationBuilder builder = DistributedApplication.CreateBuilder(args);
|
2024-12-28 17:01:18 +01:00
|
|
|
|
2025-06-12 17:43:22 +02:00
|
|
|
IResourceBuilder<PostgresDatabaseResource> postgres = builder.AddPostgres(Constants.Database.ServiceName)
|
2025-06-12 19:12:26 +02:00
|
|
|
.WithLifetime(ContainerLifetime.Persistent)
|
2024-12-28 17:01:18 +01:00
|
|
|
.WithDataVolume()
|
|
|
|
|
.AddDatabase(Constants.Database.Name);
|
|
|
|
|
|
|
|
|
|
builder
|
2025-06-12 18:22:37 +02:00
|
|
|
.AddProject<Projects.Vegasco_Server_Api>(Constants.Projects.Api)
|
2024-12-28 17:01:18 +01:00
|
|
|
.WithReference(postgres)
|
|
|
|
|
.WaitFor(postgres);
|
|
|
|
|
|
|
|
|
|
builder.Build().Run();
|