I have a Python Flask web app deployed to Azure App Service via Azure Devops. Everything has been working well until I added pyOpenMS. The app began failing to start with the logs showing this error:
ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
I've since solved that issue thanks to an answered Stackoverflow question by running these two commands in the App Service SSH:
apt update
apt-get install -y libglib2.0-0 libsm6 libxrender1 libxext6
However, it gets really tiring to have to run these two commands every time we make a deployment. I've attempted to use the startup command option in the App Service configuration options, both by adding the commands directly in the corresponding textbox, or by specifying a startup file containing those two commands in the repository. I can see in the logs that the commands were ran, but the web app still fails to startup, showing the same error as if the commands weren't ran at all.
Am I missing anything? Are there additional commands I need to add to the startup?
I connected with Azure support and I needed to add:
&& gunicorn --bind=0.0.0.0 --timeout 600 app:app
to my startup command in order to actually start the web app.