@P, Rajath K , Firstly, apologies for the late response from over the weekend.
1. Based on the error message it appears to be an issue with the port on which it’s listening on.
By default, App Service assumes your custom container is listening on port 80. If your container listens to a different port, as in your case, you need set that
WEBSITES_PORT
(for customer containers) app setting only in your App Service app.
To manually configure a custom port, use the EXPOSE
instruction in the Dockerfile
and the app setting, WEBSITES_PORT,
with a port value
to bind on the container.
Whereas, for default/blessed image, the PORT
variable is not necessary to automatic port detection. If no port is detected, it defaults to 80.
The WEBSITES_PORT app setting does not have any effect within the container, and you can’t access it as an environment variable within the container.
Only port 80 and 8080 is accessible (exposed ports) -App Service Linux FAQ
2.By default, if your container does not respond after 230 seconds
, it will time out. (This time out can be increased by with the WEBSITES_CONTAINER_START_TIME_LIMIT
app setting.)
If your container takes a long time, you could add an app setting called WEBSITES_CONTAINER_START_TIME_LIMIT and set it to the number of seconds you would like for us to wait for your container to start (up to a maximum of 1800
).
To do this, from the Azure Portal> Navigate to your WebApp > Under Settings blade > Go to “Configuration” > Add the above app setting with ‘Name’ with 1800 as ‘Value’ .
3. Python apps must be deployed with all the required pip modules
Kindly see this sample.
4. You can add start-up command for customization. Please review the bindings and check the startup command
As mentioned in this doc -customize-startup-command
5. The App Service container that runs Python apps has Django and Flask installed by default, along with the gunicorn web server.
To use a framework other than Django or Flask (such as Falcon, FastAPI, etc.), or to use a different web server, do the following:
Startup commands for other frameworks and web servers
Also, note we cannot access your Source Control Manager (SCM)/Kudu site, it’s accessible to website owners (you and your webapp contributor).
Note: Please do not share any PII data on the public forum.
Kindly let us know how it goes, I'll follow-up with you further on this.