Skip to content

Commit 3f35413

Browse files
committed
feat(aspire): compose Data API Builder container (8082) and pass GraphQL URL to portal
1 parent b65add1 commit 3f35413

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

management-portal/AppHost/Program.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@
22

33
var builder = DistributedApplication.CreateBuilder(args);
44

5+
// Data API Builder container (GraphQL) for local development
6+
var dab = builder.AddContainer("dab", "mcr.microsoft.com/data-api-builder", tag: "latest")
7+
.WithBindMount("..\\dab\\dab-config.json", "/App/dab-config.json")
8+
.WithEnvironment("ASPNETCORE_URLS", "http://+:8082")
9+
// Provide COSMOS_CONNECTION_STRING via environment or user-secrets for DAB to connect to Cosmos
10+
.WithHttpEndpoint(port: 8082, name: "http")
11+
.WithArgs(["dab", "start", "--host", "0.0.0.0", "--config", "/App/dab-config.json"]);
12+
513
var portal = builder.AddProject("portal", "..\\src\\Portal\\Portal.csproj")
614
.WithEnvironment("ASPNETCORE_URLS", "http://+:8081")
15+
.WithEnvironment("DAB_GRAPHQL_URL", "http://localhost:8082/graphql")
716
.WithHttpEndpoint(port: 8081, name: "http");
817

918
builder.Build().Run();

0 commit comments

Comments
 (0)