Kaue Caponero
Kaue Caponero

Reputation: 1

Azure Web App deploy via GitHub Actions triggers unwanted Oryx/OneDeploy build

I'm having issues configuring an automatic deployment for a Python (FastAPI) app to Azure Web App using GitHub Actions. The deployment succeeds, but Azure is automatically triggering an Oryx build and a OneDeploy process, which I want to avoid.

enter image description here

Has anyone encountered a similar issue or found a solution to bypass the Oryx and OneDeploy process? Any guidance would be greatly appreciated!

I've tried multiple configurations to disable this automatic build on Azure, but nothing has worked so far. Here’s what I’ve tried:

Set the environment variables ENABLE_ORYX_BUILD=false and WEBSITE_RUN_FROM_PACKAGE=1 in the Azure Web App configuration to disable the automatic build. However, OneDeploy and Oryx are still being triggered. Removed any Startup Command in the Azure configuration and set up the GitHub Actions workflow to create a ZIP package of the pre-built application, expecting Azure to deploy it directly without rebuilding. Adjusted the GitHub Actions workflow to authenticate with publish-profile rather than client-id and tenant-id, aiming for a simpler, direct deployment, but the issue persists.

Upvotes: 0

Views: 336

Answers (1)

Sirra Sneha
Sirra Sneha

Reputation: 1197

I tried deploying a Fastapi application by avoiding the oryx/onedeploy build but failed to do that.

I've tried setting DO_NOT_USE_ORYX=true and also modified my workflow file with different configurations to avoid the Oryx build, but it still fails to bypass the build process, as Oryx is enabled by default on Azure App Service for Linux.

enter image description here

Unfortunately, it appears that when using deployment methods like ZipDeploy or GitHub Action, Oryx is enabled by default.

  • Disabling or controlling Oryx with settings like SCM_DO_BUILD_DURING_DEPLOYMENT=false is not simple for deployments that use Oryx.

  • Even after setting SCM_DO_BUILD_DURING_DEPLOYMENT=false while deploying the app, Oryx is still enabled and it builds the application, as shown in the logs below. enter image description here

  • Please refer this blog for better understanding about the python deployments on Azure App Service(linux).

  • Refer this doc for oryx configuration.

  • If you're using visual studio code, it will use Remote build adding ENABLE_ORYX_BUILD=true and SCM_DO_BUILD_DURING_DEPLOYMENT=1 and enabling Oryx for building assets.

  • If you definitely want to bypass Oryx, you can consider using External Builders, as they do not enable Oryx by default.

  • You can deploy your application using Azure Pipelines or Zip Deploy via Azure CLI to bypass the Oryx build.

  • Refer this doc to know how to deploy python application to Azure web app using Azure pipelines.

Upvotes: 0

Related Questions