Docker Community Forums

Share and learn in the Docker community.

Reverse proxy + IIS + Asp.Net Legacy

docker

(Abhinand Jinugu) #1

I have two services running in a swarm (I’ll call them A and B) with replica as 1 which means one container for each service.

Service A has a web application (UI) that calls another web app (api) in service B.

Service A is exposed on 8082 and Service B on 8081.

However I will have to implement some kind off reverse proxy to make this work due to the difference in ports and CORS won’t allow A to call B(even though they are available on same url as they are part of the swarm).

My idea was to have a dummy web api in A along with the existing UI application and add urlReWrite rule to the dummy api so that the request from UI app to dummy web app in Service A will be redirected to the actual one in service B.

For whatever reason this doesn’t work. I just get 404 error. Can someone help me with this?

I’m also attaching the the dockerfile for Service A which has urlRewrite written into it.

DockerFile.txt (2.6 KB)