I have my angular app deployed on Azure App Service, but when I deployed the new version of the application, the old files are not replaced by the new one and this causes ‘Not Found error’ for styles and fonts file in the deployed app, and I didn’t got any particular instructions to do the same? so, how to remove the folders such as ‘media’, etc., from azure console.
I was trying to remove all the files from azure app service before redeploying the angular app to it.
2
Answers
You can delete the deployed files directly from KUDU Console.
KUDU URL –
https://AppName.scm.azurewebsites.net/
For Windows App Service:
KUDU =>Debug Console => CMD =>
C:homesitewwwroot>
You can directly remove the file/folder or run the command
rmdir
.I have taken references from this MSDoc to remove its folder and sub files.
For Linux App Service:
URL –
https://AppName.scm.azurewebsites.net/newui
=>File Manager
=>site/wwwroot
You can use the Azure App Service slots.
For example, if your app is running in production, deploy your updated app to a slot "myslotA" and then swap "myslotA" with production slot. Then you will have no unwanted files.
https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/slot?view=azure-cli-latest