Serve content from Azure Files
This guide shows how to serve static content in App Service on Linux by using Azure Storage. Benefits include secured content, content portability, access to multiple apps, and multiple transferring methods. In this guide, you learn how to serve content on Azure Storage by configuring custom storage.
- An existing Windows Container app in Azure App Service
- Azure CLI (2.0.46 or later).
- Create Azure file share
Azure Files is non-default storage and billed separately, not included with the web app.
Link storage to your web app (preview)
To mount an Azure Files to a directory in your App Service app, you use the az webapp config storage-account add command. Storage Type must be AzureFiles.
az webapp config storage-account add --resource-group <group_name> --name <app_name> --custom-id <custom_id> --storage-type AzureFiles --share-name <share_name> --account-name <storage_account_name> --access-key "<access_key>" --mount-path <mount_path_directory of form c:<directoryname>> You should do this for any other directories you want to be linked to an Azure Files Share.
Verify Once an Azure Files share is linked to a web app, you can verify this by running the following command:
Copy az webapp config storage-account list --resource-group <group_name> --name <app_name>