whatsinaname
communication between host to the docker and the docker to the host machine
I have 2 server apps - an MVC dotnet app and dotnet API.
a dotnet mvc web app which runs on 8888 port locally and the api which runs on 8889 port locally.
I have another 2 angular apps which runs on 4200 and 4300 ports in the containers and I use docker hub.
I don't want to build the angular apps every time and I want to run on docker such a way that we don't have to run these angular apps every time. the constraint here is we load the angular app inside the mvc webapp iframe. I was able to load the angular app but I can't call the APIs from the angular app. i am able to run mvc app with the anulgar app loaded in the iFrame. MVC app will run on the host machine, angular apps run on docker. but the issue is the angular app in the docker is unable to hit the API on the host machine.
the software i use here are visual studio, docket hub and visual studio code.
tried different options
- adding network mode to host and tried host.docker.internal, but it didn't work.
- adding IP Address of the host and tried but it didn't work.
- Creating a custom network on docker and tried but it didn't work.
Is there a way to fix this issue? this is for the dev-setup, if we do it, it will help our dev team.
need to run the angular app inside a mvc app which the angular runs on docker and mvc runs on the host machine. the angular needs to call the API which runs on the host machine.
4 replies
monitoring and observability
I need resources to do monitoring and observability using the Azure Application Insights. In my application, we already have used application insights but we need an approach to do the SRE. To have alerts, cpu usage, memory usage and DB long running queries, perf issues or all failed requests 401, 404, 403 and 500. Please suggest an approach and share resources for the same. Thank you
3 replies
docker-angular-dotnet app
I do mostly backend dev and I don't want to build my angular app every time. I wanted to host it in my local docker hub and run it. But I'm able to see the login page but it looks like it's not able to invoke the backend apis. The config in the angular app is pointing to localhost, I tried changing it to use the ngrok to ensure that it points the dotnet API on the host machine but nothing worked, any idea what went wrong?
29 replies
HttpRequestException:An error occurred while sending the request. WebException
HttpRequestException:An error occurred while sending the request. WebException:Unable to connect to the remote server SocketException:No connection could be made because the target machine actively refused it
Please let me know what could be the solution, I was trying to hit the local host only.
33 replies