You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Mount Azure Storage as a local share in App Service
12
12
13
13
::: zone pivot="code-windows"
14
-
> [!NOTE]
15
-
> Mounting Azure Storage as a local share for App Service on Windows code (non-container) is currently in preview.
16
-
>
14
+
17
15
This guide shows how to mount Azure Storage Files as a network share in Windows code (non-container) in App Service. Only [Azure Files Shares](../storage/files/storage-how-to-use-files-portal.md) and [Premium Files Shares](../storage/files/storage-how-to-create-file-share.md) are supported. The benefits of custom-mounted storage include:
18
16
19
17
- Configure persistent storage for your App Service app and manage the storage separately.
@@ -164,6 +162,7 @@ The following features are supported for Linux containers:
164
162
|**Share name**| Files share to mount. |
165
163
|**Access key** (Advanced only) |[Access key](../storage/common/storage-account-keys-manage.md) for your storage account. |
166
164
|**Mount path**| Directory inside your app service that you want to mount. Only `/mounts/pathname` is supported.|
165
+
|**Deployment slot setting**| When checked, the storage mount settings also apply to deployment slots.|
167
166
::: zone-end
168
167
::: zone pivot="container-windows"
169
168
| Setting | Description |
@@ -174,6 +173,7 @@ The following features are supported for Linux containers:
174
173
|**Share name**| Files share to mount. |
175
174
|**Access key** (Advanced only) |[Access key](../storage/common/storage-account-keys-manage.md) for your storage account. |
176
175
|**Mount path**| Directory inside your Windows container that you want to mount. Do not use a root directory (`[C-Z]:\` or `/`) or the `home` directory (`[C-Z]:\home`, or `/home`) as it's not supported.|
176
+
|**Deployment slot setting**| When checked, the storage mount settings also apply to deployment slots.|
177
177
::: zone-end
178
178
::: zone pivot="container-linux"
179
179
| Setting | Description |
@@ -185,6 +185,7 @@ The following features are supported for Linux containers:
185
185
|**Storage container** or **Share name**| Files share or Blobs container to mount. |
186
186
|**Access key** (Advanced only) |[Access key](../storage/common/storage-account-keys-manage.md) for your storage account. |
187
187
|**Mount path**| Directory inside the Linux container to mount to Azure Storage. Do not use `/` or `/home`.|
188
+
|**Deployment slot setting**| When checked, the storage mount settings also apply to deployment slots.|
188
189
::: zone-end
189
190
190
191
# [Azure CLI](#tab/cli)
@@ -239,6 +240,9 @@ To validate that the Azure Storage is mounted successfully for the app:
239
240
## Best practices
240
241
241
242
::: zone pivot="code-windows"
243
+
244
+
- Azure Storage mounts can be configured as a virtual directory to serve static content. To configure the virtual directory, in the left navigation click **Configuration**>**Path Mappings**>**New Virtual Application or Directory**. Set the **Physical path** to the **Mount path** defined on the Azure Storage mount.
245
+
242
246
- To avoid potential issues related to latency, place the app and the Azure Storage account in the same Azure region. Note, however, if the app and Azure Storage account are in same Azure region, and if you grant access from App Service IP addresses in the [Azure Storage firewall configuration](../storage/common/storage-network-security.md), then these IP restrictions are not honored.
243
247
244
248
- In the Azure Storage account, avoid [regenerating the access key](../storage/common/storage-account-keys-manage.md) that's used to mount the storage in the app. The storage account contains two different keys. Azure App Services stores Azure storage account key. Use a stepwise approach to ensure that the storage mount remains available to the app during key regeneration. For example, assuming that you used **key1** to configure storage mount in your app:
0 commit comments