I am currently trying to create a new container on Azure Container Instance, to deploy a angular app frontend on it , using Nginx Image.
I have created a Container Registry on Azure and pushed an image on it (from on-premises Docker).
This application communicate with a backend. In local , i configure the web.config to set the backend server and i run the conrtainer ; It's work
In azure , when i create the container , my app doesn't connect with the backend ( i create a portforward to the backend)
This is the configuration of web.config in frontend apps :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ToBack" stopProcessing="true">
<match url="rc/(.*)" />
<action type="Rewrite" url="http://X.Y.W.Z:6555/api/{R:1}" logRewrittenUrl="true" />
<conditions>
</conditions>
</rule>
<rule name="AngularIndex" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="./index.html" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Detailed" />
</system.webServer>
<location path="index.html">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</location>
</configuration>
and the Dockerfile :
FROM nginx:stable-alpine
EXPOSE 80
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
COPY dist/ .
when i tape curl http://X.Y.W.Z:6555
, from the ACI console , i get the responce from the backend.
any idea to fix that ?