0

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.

1
  • please share your github yaml file. Commented Nov 6, 2024 at 23:39

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

I recently faced this issue while deploying my node app to azure. This is how I fixed mine.

  • You can open you kudu console and check if all the files are correct.

  • For mine oryx added oryx manifest file and removed the node_modules. If for your fastapi cases oryx manifest is present you can remove these files. As of my case I removed all files including hidden files inside wwwroot directory.

  • On your application settings add environment variables ENABLE_ORYX_BUILD=false, SCM_DO_BUILD_DURING_DEPLOYMENT=1, COMMAND: echo "bypass oryx" in this COMMAND you can give any bash script or even give the path to your custom startup script file. The file you can keep at your project root or in the site folder(kudu console)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.