prom3theu5 / aspirational-manifests

Handle deployments of .NET Aspire AppHost Projects
MIT License
702 stars 36 forks source link

Frontend javascript projects don't find the referenced endpoints #233

Open coen22 opened 5 months ago

coen22 commented 5 months ago

🔥 Bug Description

A javascript frontend application can't find the named endpoint.

2024-06-29 13:40:10 2024/06/29 11:40:10 [emerg] 1#1: unknown "services__weatherapi__https__0" variable
2024-06-29 13:40:10 nginx: [emerg] unknown "services__weatherapi__https__0" variable

🔍 Steps to Reproduce the Bug

Try out this sample and build using aspirate generate --output-format compose && aspirate build Disable the angular project by remvoing it from AppHost (if you're having versioning issues like me) https://github.com/dotnet/aspire-samples/tree/main/samples/AspireWithJavaScript When the docker compose is run, the error will be thrown in the log.

🧯 Possible Solution

Create a wrapper Program.cs that injects the address. However, I've failed to find the address behind the named endpoint