.deployment file not working while doing zip deployment of an azure app

88 Views Asked by At

I have an application that I am trying to deploy to an existing app to an offline server.

The application is two parts: a nodejs frontend and a python backend app. I use the zip deployment method to wrap everything and use it in the server (explained here https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package)

I want to create a ".deployment" file to run the offline installation for the python libraries I downloaded from pip. The method of creating a .deployment is explained here https://github.com/projectkudu/kudu/wiki/Custom-Deployment-Script

I created a startup.sh file that contains the commands that I need to run, which is basically as below:

cd backend  
pip install --no-index --find-links downloaded_pip -r requirements.txt
gunicorn --bind=0.0.0.0:8081 --timeout 600 app:app

and then I created .deployment file that contains the below

[config]
command = startup.sh

I put this on the zip file with the .deployment and .startup.sh in the root and I deploy.. it doesn't seem like it do anything with .deployment.. I actually have to go to the shell and run those commands each time I deploy for the libraries to be installed.

no idea what am I doing wrong.

0

There are 0 best solutions below