Skip to content

Commit 1b18610

Browse files
committed
https://github.com/MicrosoftDocs/azure-docs/pull/99454
1 parent cb44354 commit 1b18610

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

articles/app-service/deploy-run-package.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,6 @@ Because the `WEBSITE_RUN_FROM_PACKAGE` app setting is set, this command doesn't
4747

4848
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.
4949

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-
6250
## Run from external URL instead
6351

6452
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
7159

7260
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.
7361

74-
### Fetch a package from Azure Blob Storage using a managed identity
62+
### Access a package in Azure Blob Storage using a managed identity
7563

7664
[!INCLUDE [Run from package via Identity](../../includes/app-service-run-from-package-via-identity.md)]
7765

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+
7877
## Troubleshooting
7978

8079
- 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

Comments
 (0)