-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathProgram.cs
More file actions
32 lines (28 loc) · 1.35 KB
/
Program.cs
File metadata and controls
32 lines (28 loc) · 1.35 KB
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
29
30
31
32
var builder = DistributedApplication.CreateBuilder(args);
var cache = builder.AddRedis("cache").WithRedisInsight();
var postgres = builder.AddPostgres("postgres").WithPgAdmin();
var postgresdb = postgres.AddDatabase("postgresdb");
var serviceBus = builder.AddAzureServiceBus("messaging").RunAsEmulator();
var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var blobs = storage.AddBlobs("blobs");
var queues = storage.AddQueues("queues");
var tables = storage.AddTables("tables");
var migration = builder.AddProject<Projects.BervProject_WebApi_Boilerplate_MigrationService>("migrations")
.WithReference(postgresdb, connectionName: "BoilerplateConnectionString")
.WithExplicitStart();
builder.AddProject<Projects.BervProject_WebApi_Boilerplate>("apiservice")
.WithHttpEndpoint()
.WithReference(cache, connectionName: "Redis")
.WithReference(postgresdb, connectionName: "BoilerplateConnectionString")
.WithReference(blobs, connectionName: "AzureStorageBlob")
.WithReference(queues, connectionName: "AzureStorageQueue")
.WithReference(tables, connectionName: "AzureStorageTable")
.WithReference(serviceBus, connectionName: "AzureServiceBus")
.WaitFor(cache)
.WaitFor(postgresdb)
.WaitFor(blobs)
.WaitFor(queues)
.WaitFor(tables)
.WaitFor(serviceBus)
.WaitForCompletion(migration);
builder.Build().Run();