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
Copy file name to clipboardExpand all lines: articles/app-service/deploy-run-package.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,18 +47,6 @@ Because the `WEBSITE_RUN_FROM_PACKAGE` app setting is set, this command doesn't
47
47
48
48
The command also restarts the app. Because `WEBSITE_RUN_FROM_PACKAGE` is set, App Service mounts the uploaded package as the read-only *wwwroot* directory and runs the app directly from that mounted directory.
49
49
50
-
### Webjobs with WEBSITE_RUN_FROM_PACKAGE=1
51
-
How does that affect WebJobs?
52
-
There are two scenario for WebJobs,
53
-
- Webjobs deployed with your App service
54
-
- Webjobd deployed separately from your App Servicep
55
-
The first kind is simple, as they will just be part of the zip file, along with the rest of the app. But for those that are deployed separately(e.g. Deploy webjobs after app service creation or create webjobs from portal after deployment) things are different because they can't just be uploaded to d:\home\site\wwwroot\app_data\jobs\..., which is read-only.
56
-
57
-
To solve this, WebJobs is deployed to d:\home\site\jobs\...
58
-
Jobs from both locations can exist in the same app.
59
-
60
-
Note: As this makes site\wwwroot read only this means that file operations will fail including the creation of the *disable.job*
61
-
62
50
## Run from external URL instead
63
51
64
52
You can also run a package from an external URL, such as Azure Blob Storage. You can use the [Azure Storage Explorer](../vs-azure-tools-storage-manage-with-storage-explorer.md) to upload package files to your Blob storage account. You should use a private storage container with a [Shared Access Signature (SAS)](../vs-azure-tools-storage-manage-with-storage-explorer.md#generate-a-sas-in-storage-explorer) or [use a managed identity](#fetch-a-package-from-azure-blob-storage-using-a-managed-identity) to enable the App Service runtime to access the package securely.
@@ -71,10 +59,21 @@ az webapp config appsettings set --name <app-name> --resource-group <resource-gr
71
59
72
60
If you publish an updated package with the same name to Blob storage, you need to restart your app so that the updated package is loaded into App Service.
73
61
74
-
### Fetch a package from Azure Blob Storage using a managed identity
62
+
### Access a package in Azure Blob Storage using a managed identity
75
63
76
64
[!INCLUDE [Run from package via Identity](../../includes/app-service-run-from-package-via-identity.md)]
77
65
66
+
## Deploy WebJob files when running from package
67
+
68
+
There are two ways to deploy [WebJob](webjobs-create.md) files when you [enable running an app from package](#enable-running-from-package):
69
+
70
+
71
+
- Deploy in the same ZIP package as your app: include them as you normally would in `<project-root>\app_data\jobs\...` (which maps to the deployment path `\site\wwwroot\app_data\jobs\...` as specified in the [WebJobs quickstart](webjobs-create.md#webjob-types)).
72
+
- Deploy separately from the ZIP package of your app: Since the usual deployment path `\site\wwwroot\app_data\jobs\...` is now read-only, you can't deploy WebJob files there. Instead, deploy WebJob files to `\site\jobs\...`, which is not read only. WebJobs deployed to `\site\wwwroot\app_data\jobs\...` and `\site\jobs\...` both run.
73
+
74
+
> [Note]
75
+
> When `\site\wwwroot` becomes read-only, operations like the creation of the *disable.job* will fail.
76
+
78
77
## Troubleshooting
79
78
80
79
- Running directly from a package makes `wwwroot` read-only. Your app will receive an error if it tries to write files to this directory.
0 commit comments