|
25 | 25 | var publicApiSecretConfig = builder.Configuration.GetSection("PublicApiSecretEncryption"); |
26 | 26 | var selectOrgConfig = builder.Configuration.GetSection("SelectOrganisation"); |
27 | 27 | var internalApiConfig = builder.Configuration.GetSection("InternalApiClient"); |
| 28 | +var efConfig = builder.Configuration.GetSection("EntityFramework"); |
28 | 29 | var redisConnectionString = redis.Resource.ConnectionStringExpression; |
29 | 30 |
|
30 | 31 | builder.AddProject<Projects.Dfe_SignIn_Web_Help>("app-help", launchProfileName: "http") |
|
55 | 56 | .WaitFor(frontend) |
56 | 57 | .WaitFor(redis); |
57 | 58 |
|
| 59 | +var internalApi = builder.AddProject<Projects.Dfe_SignIn_InternalApi>("app-internal-api", launchProfileName: "http") |
| 60 | + .WithEnvironment("ASPNETCORE_ENVIRONMENT", builder.Configuration["ASPNETCORE_ENVIRONMENT"] ?? "Local") |
| 61 | + .WithEnvironment("EntityFramework__Directories__Host", efConfig["Directories:Host"]) |
| 62 | + .WithEnvironment("EntityFramework__Directories__Name", efConfig["Directories:Name"]) |
| 63 | + .WithEnvironment("EntityFramework__Directories__Username", efConfig["Directories:Username"]) |
| 64 | + .WithEnvironment("EntityFramework__Directories__Password", efConfig["Directories:Password"]) |
| 65 | + .WithEnvironment("EntityFramework__Organisations__Host", efConfig["Organisations:Host"]) |
| 66 | + .WithEnvironment("EntityFramework__Organisations__Name", efConfig["Organisations:Name"]) |
| 67 | + .WithEnvironment("EntityFramework__Organisations__Username", efConfig["Organisations:Username"]) |
| 68 | + .WithEnvironment("EntityFramework__Organisations__Password", efConfig["Organisations:Password"]) |
| 69 | + .WithEnvironment("InternalApiClient__ClientId", internalApiConfig["ClientId"]) |
| 70 | + .WithEnvironment("InternalApiClient__ClientSecret", internalApiConfig["ClientSecret"]) |
| 71 | + .WithEnvironment("InternalApiClient__Tenant", internalApiConfig["Tenant"]) |
| 72 | + .WithEnvironment("InternalApiClient__HostUrl", internalApiConfig["HostUrl"]) |
| 73 | + .WithEnvironment("InternalApiClient__Search__BaseAddress", internalApiConfig["Search:BaseAddress"]) |
| 74 | + .WithEnvironment("InternalApiClient__Access__BaseAddress", internalApiConfig["Access:BaseAddress"]) |
| 75 | + .WithEnvironment("InternalApiClient__Organisations__BaseAddress", internalApiConfig["Organisations:BaseAddress"]) |
| 76 | + .WithEnvironment("InternalApiClient__Directories__BaseAddress", internalApiConfig["Directories:BaseAddress"]) |
| 77 | + .WithEnvironment("InternalApiClient__Applications__BaseAddress", internalApiConfig["Applications:BaseAddress"]) |
| 78 | + .WithEnvironment("InternalApiClient__UseProxy", "false"); |
| 79 | + |
58 | 80 | builder.AddProject<Projects.Dfe_SignIn_PublicApi>("app-public-api", launchProfileName: "http") |
59 | 81 | .WithSharedConfiguration(builder.Configuration, frontend.GetEndpoint("http")) |
60 | 82 | .WithEnvironment("SelectOrganisationSessionRedisCache__ConnectionString", redisConnectionString) |
61 | 83 | .WithEnvironment("InteractionsRedisCache__ConnectionString", redisConnectionString) |
62 | 84 | .WithEnvironment("BearerToken__ValidAudience", bearerTokenConfig["ValidAudience"]) |
63 | 85 | .WithEnvironment("PublicApiSecretEncryption__Key", publicApiSecretConfig["Key"]) |
64 | 86 | .WithEnvironment("SelectOrganisation__SelectOrganisationBaseAddress", selectOrgConfig["SelectOrganisationBaseAddress"]) |
| 87 | + .WithEnvironment("InternalApiClient__BaseAddress", internalApi.GetEndpoint("http")) |
65 | 88 | .WithEnvironment("InternalApiClient__Access__BaseAddress", internalApiConfig["Access:BaseAddress"]) |
66 | 89 | .WithEnvironment("InternalApiClient__Organisations__BaseAddress", internalApiConfig["Organisations:BaseAddress"]) |
| 90 | + .WaitFor(internalApi) |
67 | 91 | .WaitFor(redis); |
68 | 92 |
|
69 | 93 | builder.AddExecutable("tool-tls-proxy", "pwsh", "../../", "-Command", "Start-DsiTlsProxy"); |
|
0 commit comments