My micro-service will create some files that I need to access, these are mainly archive or error data.
I found the article from here that Microsoft azure app service by default mount persistent shared storage across the container
From Microsoft documentation:
"You can use the
/home
directory in your app's file system to persist files across restarts and share them across instances. The/home
in your app is provided to enable your container app to access persistent storage."
More details here: https://learn.microsoft.com/en-us/azure/app-service/containers/configure-custom-container#use-persistent-shared-storage
Now I want to access the /home
directory to check the files created by the service.
I tried a lot of approaches like using the using FTPS using the deployment credentials, but I am not able to see the /home
directory
How I can access the persistent-shared-storage which is mount to the docker container?
I can not configure separate storage to app service as it is in preview mode and not supported for production scenario as per this documentation:
https://learn.microsoft.com/en-us/azure/app-service/containers/how-to-serve-content-from-azure-storage
Found the solution, Although the documentation here says By default, persistent storage is enabled, actually it is not.
I doubted this and use the below command to enable the persistent storage and now I can access the files using FileZilla FTPS
Command to enable the persistent storage
az webapp config appsettings set --resource-group <resource-group-name> --name <app-name> --settings WEBSITES_ENABLE_APP_SERVICE_STORAGE=true
Here the Test.txt and Test2.txt are the files create by my app and it is stored to persistent storage and I am able to access them.