Post-build actions in Python/Linux webapp do not run

Matthew Bellringer 26 Reputation points

I have a Django-based web app deployed from Github, running in Python 3.9. The app deploys and starts successfully.

I need to add post-build actions to complete the deployment; the exceeding common Django task of running "". Following the general and python-specific docs I have added the app setting of

There is a shell script, in the root of my app, which runs fine if I SSH into the running container. The expected behaviour is that after deployment, this should run, and output to the deployment log. Neither of these things happen; the log goes from starting the container all the way through to launching the app, without ever showing any output related to post-build actions.

I have tested the app setting POST_BUILD_COMMAND with a very simple echo, and that does nothing either.

Can you tell me either what I need to do to make these app settings work, or suggest an alternative method of running the post-build script?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,765 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 25,391 Reputation points Microsoft Employee

    Hi @Matthew Bellringer ,

    You need to set the app setting to a relative path.

    Note: Always use relative paths in all pre- and post-build scripts because the build container in which Oryx runs is different from the runtime container in which the app runs. Never rely on the exact placement of your app project folder within the container (for example, that it's placed under site/wwwroot).


0 additional answers

Sort by: Most helpful