Oryx icon indicating copy to clipboard operation
Oryx copied to clipboard

Override the build command in the appsvc.yaml file

Open reissbaker opened this issue 1 year ago • 0 comments

Feature Request

Hello! Since I have different build commands for dev vs production in my Node.js app, I want to be able to override the build command used for production. Currently I do this with the CUSTOM_BUILD_COMMAND env var (stored as an Application Setting in Azure App Service). However, this is pretty suboptimal:

  • If I want to iterate or change the build process for production, since the build command is stored solely in an environment variable, there's no simple way to revert a bad change: once I overwrite the env var in Application Settings, the previous value is gone. If it were tracked in git, it would be easy to revert a bad change.
  • I can't use ordinary code review tools like Github PRs to track and approve changes.
  • Existing access control and audit logs for code changes can't be reused.

I notice that the appsvc.yaml file allows overriding the pre-build, post-build, and run steps. This is almost exactly what I need! But it doesn't allow overriding the actual build: I tried adding a build section to the YAML file, since it appears that the C# code to at least read the build key exists, but... It didn't do anything, and Oryx continued to use the built-in build command, ignoring my build step from the appsvc.yaml file.

It would be amazing if I could override the build command using appsvc.yaml — it would be much preferable to using an environment variable. I would love to be able to manage all elements of building and running the app via configuration files stored in my repo, rather than environment variables and custom app settings in Azure App Service.

reissbaker avatar Nov 05 '23 01:11 reissbaker