Open DaCao opened 11 months ago
@DaCao Thanks for your feedback! We will investigate and update as appropriate.
Thanks @DaCao there does seem to be some conflicting guidance here. @FinVamp1 do you have any suggestions on how to clarify this article?
@im-samz can you suggest how we might fix these apparent contradictions? It would probably help to clarify the remote build section.
Hello @DaCao, I think addressing your second assertion will clarify things: "To enable to run from package, we need WEBSITE_RUN_FROM_PACKAGE=1"
When you set SCM_DO_BUILD_DURING_DEPLOYMENT=true
and ENABLE_ORYX_BUILD=true
, you are specifying a deployment path that behaves similarly to what happens when you set WEBSITE_RUN_FROM_PACKAGE=1
, with the key difference that the package is built remotely first.
"Run from package" is a deployment method in which your ready-to-run package is located in d:\home\site\wwwroot
for Windows or /home/site/wwwroot
for Linux. There are different ways that you can get your package to this location - i.e., to enable your app to run from package. Setting WEBSITE_RUN_FROM_PACKAGE=1
is one such method.
Setting SCM_DO_BUILD_DURING_DEPLOYMENT=true
and ENABLE_ORYX_BUILD=true
is another method. By doing so, you are specifying a deployment route in which your deployment package will be first built by the platform (i.e., kudu) to become ready-to-run. You don't need to specify WEBSITE_RUN_FROM_PACKAGE=1
in this case because that logic is already baked in.
To specifically answer your question, after Azure performs the remote build, the resultant file is a .zip package stored in the d:\home\data\SitePackages
(Windows) or /home/data/SitePackages
(Linux) folder. After a restart, the package is mounted to wwwroot as a read-only filesystem.
Let me know if this was helpful :)
Reading through the documents of Azure function:
Deployment options Run from package file
I have some confusions that need to be clarified:
In Remote build, it says:
To Enable functions to run from a package:
And in general considerations, it says in the last bullet point:
Isn't there a contradiction?
In Linux, when remote build, they run from deployment package.
To enable to run from package, we need
WEBSITE_RUN_FROM_PACKAGE=1
But, If your project needs to use remote build, don't use the WEBSITE_RUN_FROM_PACKAGE app setting.
I must have got my concepts wrong. Could someone offer some clarification?
To sort things out, I want to clarify a few questions:
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.