I'm deploying files to an Azure Web App via Octopus Deploy, and want to clean out the Azure Web App directories before deploying new versions. This way I can be sure I'm deploying each app version onto a clean slate. I don't want to entirely delete and re-create the app, because there are some app settings that need to carry over from previous deployments.
Kudu documentation lists the web app file structure here (all under D:\home), but I'm wondering if there's any possibility of other files outside of the D:\home directory that could affect app performance.
I tried running get-childItem D:\ -recursive
in the kudu powershell console before and after deployment to compare results and found 268 new files (not counting those in wwwroot) after deployment, all within these directories:
- D:\Windows\Temp
- D:\Windows\Logs
- D:\Windows\security\logs
- D:\Users\\AppData\Roaming\Microsoft\SystemCertificates
- D:\home\LogFiles
- D:\home\Microsoft\Windows\PowerShell
- D:\home\data\aspnet\CompilationSnapshots
- D:\local\VirtualDirectory0\LogFiles
- D:\local\VirtualDirectory0\data
- D:\local\VirtualDirectory0\site\wwwroot
- D:\local\VirtualDirectory0\Microsoft\Windows\PowerShell
- D:\local\Config\
- D:\local\Temporary ASP.NET Files\msdeploy
So which files do I need to clear or reset in order to ensure that new versions of the web app run as intended? Is it sufficient to clear out the wwwroot directory?