-
Notifications
You must be signed in to change notification settings - Fork 515
Expand file tree
/
Copy pathProgram.cs
More file actions
28 lines (21 loc) · 948 Bytes
/
Program.cs
File metadata and controls
28 lines (21 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Projects;
var builder = DistributedApplication.CreateBuilder(args);
var postgres = builder.AddPostgres("postgres")
.WithImage("postgres", "14.3")
.WithPgAdmin();
var fitnetDatabase = postgres.AddDatabase("fitnetsdb", "fitnet");
var rabbitmq = builder.AddRabbitMQ("rabbitmq")
.WithManagementPlugin();
builder.AddProject<Fitnet>("fitnet-modular-monolith")
.WithEnvironment("ASPNETCORE_ENVIRONMENT", "Development")
.WithReference(fitnetDatabase, "Database__ConnectionString")
.WithReference(rabbitmq, "EventBus__ConnectionString")
.WaitFor(postgres)
.WaitFor(rabbitmq);
builder.AddProject<Fitnet_Contracts>("fitnet-contracts-microservice")
.WithEnvironment("ASPNETCORE_ENVIRONMENT", "Development")
.WithReference(fitnetDatabase, "Database__ConnectionString")
.WithReference(rabbitmq, "EventBus__ConnectionString")
.WaitFor(postgres)
.WaitFor(rabbitmq);
await builder.Build().RunAsync();