Closed mikedice closed 3 months ago
You don't need to specify the container port. All containers share networking and can reach each other on localhost. So you just need to start the sidecar container as usual, and it'll listen to 2112. Your main app would listen to a different port. If you want to expose the main app outside the environment, you would enable external HTTP ingress and set the target port to the main app's port. Let me know if that works.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
This issue is a: (mark with an x)
Issue description
I want to deploy a container app that consists of two containers. One container is implementing a web application (SPA like web app with a few server side features). I wanted to enhance this app with the ability to perform CRUD operations on Azure Storage. I thought it would be cool to split out the whole storage piece into a side car so I made another app that implements all the storage authorization and access. On localhost, this is how the sidecar container gets started:
Inside the side car container NodeJS with Express is running and a bunch of Azure stuff. On my localhost, the web app accesses the side car using URLs like http://localhost:2112/api/xxx. All this works fine on my localhost
Now I want to deploy all of this into my Azure container app. However, I cannot find anywhere in the Azure Portal where I can tell the container app that the la-puerta-b-api container needs to map port 2112 from inside the container to port 2112 on the host so that http://localhost:2112/api/xx will work in the container app. Since I cannot figure out how to configure the port mapping on the sidecar, the app gets a connection error when it tries to connect to http://localhost:2112/api/xx
My container app sidecar exploration has failed and now I am stuck.
Steps to reproduce
Expected behavior [What you expected to happen.] A port mapping field somewhere that I can set the port mapping for the side car
Actual behavior [What actually happened.] No place that I can see or find that says how to set the port mapping for the side car. I am stuck