-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
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
Container not able to export telemetry to dashboard and environment variable not set correctly #927
Comments
@karolz-ms do you know why those environment variables wouldn't get resolved by dcp for containers? |
Issue 1 (Seems to resolve): I was able to resolve one issue related to container not able to publish metrics to aspire dashboard. In this issue is url is http://localhost:16227 so it try to listen on localhost , 127,0,0,1 and 0.0.0.0 and none will work for container. So in two.AppHost project there is lauchSettings.json and I have updated environment variable like following. Before
After ( I replace actual ip address with WSL ip address)
After this it works fine. Issue 2: Environment variable not resolve for UID and servicename and this issue still persists. |
@jp1482 thank you for submitting the issue 🤗 The simple answer to the question "why aren't variables properly expanded for container environment variable templates" is that is simply not implemented yet; these env var templates only work for executables/projects currently. In the preview 1 of Aspire containers were primarily designed for running dependencies such as databases, async communication facilities like Redis, and similar. Not really for running application services. @jp1482 can you describe what is the reason you want to run your API inside a container (as opposed to running it as ordinary process, as the startup solution does)? |
@karolz-ms running services in container is one of the patterns we expect folks to do as part of #829 |
There are multiple reason behind it.
|
@jp1482 makes sense, thanks for explanation! |
This is pretty important to make it possible to use containers from other services. I think we should investigate for preview2 |
This should be fixed in preview2 (specifically, DCP 0.1.45, which preview2 will use under the covers, should have support for env var template functions) |
Environment
- Docker is running inside WSL 2
Installation Steps
Note: This all works fine.
Project Creation
Till above point everything works and success. I am able to see dashboard and frontend and API project. Also they are able to communicate with each other.
I want to experiment with container support. So I have create docker image of api project created by aspire-starter. That also works fine.
Now I have changed the two.AppHost to add container. (Program.cs)
Also change frontend as container service name change so to give correct name.
Change in project two.web (Program.cs)
ISSUES
The text was updated successfully, but these errors were encountered: