Skip to content

Pass own endpoint to a project as environment variable #3522

Answered by davidfowl
Kralizek asked this question in Q&A
Discussion options

You must be logged in to vote

We might need a new API to make this pleasant. Right now you would need to do something wacky like:

EndpointReference adminHttp = default!;

var admin = builder.AddProject<Admin>("admin")
    .WithEnvironment("AdminUi__AuthorityUrl", auth.GetEndpoint("http"))
    .WithEnvironment(context => context.EnvironmentVariables["AdminUi__UiUrl"] = adminHttp)
    .WithReference(db);

adminHttp = admind.GetEndpoint("http");

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Kralizek
Comment options

Answer selected by Kralizek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants