-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
50 lines (42 loc) · 2.06 KB
/
Copy pathProgram.cs
File metadata and controls
50 lines (42 loc) · 2.06 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using Aspire.Hosting;
var builder = DistributedApplication.CreateBuilder(args);
var mongodbUserName = builder.AddParameter("mongodb-username", "helpdesk", publishValueAsDefault: true);
var mongodbPassword = builder.AddParameter("mongodb-password", "helpdesk-local-password", publishValueAsDefault: true);
var mongodb = builder
.AddMongoDB("mongodb", 27017, mongodbUserName, mongodbPassword)
.WithImageTag("8.2");
var identity = builder
.AddProject<Projects.Services_UserIdentity>(
"identity",
options => options.ExcludeLaunchProfile = true)
.WithEnvironment("ASPNETCORE_ENVIRONMENT", "Development")
.WithHttpEndpoint(env: "UserIdentity__HttpPort")
.WithReference(mongodb, "MongoDB")
.WaitFor(mongodb);
var profile = builder
.AddProject<Projects.Services_UserProfile>(
"profile",
options => options.ExcludeLaunchProfile = true)
.WithEnvironment("ASPNETCORE_ENVIRONMENT", "Development")
.WithHttpEndpoint(env: "UserProfile__HttpPort")
.WithReference(mongodb, "MongoDB")
.WaitFor(mongodb)
.WaitFor(identity);
builder
.AddProject<Projects.Services_Notifications>(
"notifications",
options => options.ExcludeLaunchProfile = true)
.WithEnvironment("ASPNETCORE_ENVIRONMENT", "Development")
.WithReference(mongodb, "MongoDB")
.WaitFor(mongodb)
.WaitFor(identity);
var frontend = builder
.AddViteApp("frontend", "../../frontend")
.WithPnpm(install: false)
.WithEnvironment("IDENTITY_API_BASE_URL", identity.GetEndpoint("http"))
.WithEnvironment("PROFILE_API_BASE_URL", profile.GetEndpoint("http"))
.WaitFor(identity)
.WaitFor(profile);
// Email verification links target the frontend origin (not Identity HTTP).
identity.WithEnvironment("UserIdentity__FrontendBaseUrl", frontend.GetEndpoint("http"));
builder.Build().Run();