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);
|
|
|
|
|
|
2025-06-13 20:12:43 +02:00
|
|
|
IResourceBuilder<ProjectResource> api = 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);
|
|
|
|
|
|
2025-06-13 20:12:43 +02:00
|
|
|
builder
|
|
|
|
|
.AddNpmApp("Vegasco-Web", "../Vegasco-Web")
|
|
|
|
|
.WithReference(api)
|
|
|
|
|
.WaitFor(api)
|
2025-06-15 12:49:31 +02:00
|
|
|
.WithHttpEndpoint(port: 44200, env: "PORT", isProxied: false)
|
2025-06-15 09:36:52 +02:00
|
|
|
.WithExternalHttpEndpoints();
|
2025-06-13 20:12:43 +02:00
|
|
|
|
2024-12-28 17:01:18 +01:00
|
|
|
builder.Build().Run();
|