Azure Container Web App for Angular Deployment

365 Views Asked by At

my current set up is I have angular application out of which I am building a docker image and publishing it to Container web app in Azure(all happens through DevOps). for the application settings I am using Storage mount to my application so that it will use it from there. Here is how the angular application read the application settings.

return new Promise<void>((resolve, reject) => {
  this.http
    .get(`assets/config/appsettings.json`)
    .toPromise()
    .then((response: any) => {
      const responseString = JSON.stringify(response);
      configProviderService.settings = JSON.parse(
        responseString
      ) as IUserConfig;
      resolve();
    })
    .catch((response: any) => {
      reject(`Could not load file`);
    });

since I am using nginx in the docker image, I am mounting the application settings in storage and providing the mountpath as nginx/html/assets/config(how we do it in AKS with config map). Application is working fine. but we are trying to move from the idea of using storage account just for the application settings since we dont have any dependency of storage account in the infra also from the security prespective that most people will have read permission on the resource group.

so my question is, is there any other place I can load the settings(considering build once and deploy many) for the angular application or moving to traditional web app will help?

Update: we have moved away from docker web app to normal web app.

0

There are 0 best solutions below