We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need one service/container of my Aspire app to use a custom port (5050) instead of 8080.
I did this in the AppHost:
var builder = DistributedApplication.CreateBuilder(args); var secondapi = builder.AddProject<Projects.SecondApi>("secondapi") .WithEndpoint("http", endpoint => { endpoint.Port = 5050; endpoint.IsProxied = false; }); builder.AddProject<Projects.OtelSampleApi>("otelsampleapi") .WithReference(secondapi); builder.Build().Run();
And the generated manifest after running Aspire looks like this:
"$schema": "https://json.schemastore.org/aspire-8.0.json", "resources": { "secondapi": { "type": "project.v0", "path": "../SecondApi/SecondApi.csproj", "env": { "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", "OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory", "ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true", "HTTP_PORTS": "{secondapi.bindings.http.targetPort}" }, "bindings": { "http": { "scheme": "http", "protocol": "tcp", "transport": "http", "port": 5050 }, "https": { "scheme": "https", "protocol": "tcp", "transport": "http" } } },
But the built container still uses 8080.
Is there something I need to do differently to get the container to use 5050?
I'm building for Compose btw.
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I need one service/container of my Aspire app to use a custom port (5050) instead of 8080.
I did this in the AppHost:
And the generated manifest after running Aspire looks like this:
But the built container still uses 8080.
Is there something I need to do differently to get the container to use 5050?
I'm building for Compose btw.
Thanks!
The text was updated successfully, but these errors were encountered: