question

MohammadVahed-9121 avatar image
1 Vote"
MohammadVahed-9121 asked Grmacjon-MSFT commented

How to set up Python App on Azure App Service in Linux Ubuntu

Hello,

I am quite new to azure web app services. I am having an issue with deploying the Python web app on azure (Linux os).

I want to explain about the project, We used the PheWeb project (https://github.com/statgen/pheweb) that is base on Python, after install, we can process raw data and keep result on HDD, and for showing the result, we used "pheweb serve --open" command (in the path of results) to open localhost/5000 and show the result on internet explore.
I read and tested a lot of times by Azure help, but did not work.
So, I completely confuse that how can deploy and show results in the Azure server!

Can anyone please let me help in this step-by-step deployment on Linux azure web app?

Thanks in advance.

azure-webappsazure-webapps-content-deploymentazure-webapps-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered Grmacjon-MSFT commented

Hi @MohammadVahed-9121

We apologies for any inconvenience you experienced while trying to set up your Python App on Azure.


Please follow the below tutorial based on how you plan on deploying your app:

Deploy Python apps to Azure App Service on Linux from Visual Studio Code

or

Deploy a Python app using Azure App Service on Linux (using Flask or Django frameworks)

Hope that helps. Letus know if you have further questions

-Grace

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

Thank you for your help, actually as explain before my problem is how to show results on the Ubuntu server, my App works, but I do not know how can I show it on the web!!
This is my domain and IP address (ucla-pheweb.eastus.cloudapp.azure.com, 20.84.51.36)and after running my app, nothing in that address!

Could you help me to solve it?
Thank you.

azureuser@pheweb-ubuntu:~/pheweb$ pheweb serve --open
The DISPLAY variable is not set, so not attempting to open a web browser

If you can open a web browser on this computer (ie, the one running PheWeb), open http://localhost:5000/ .

[2021-03-19 17:13:06 +0000] [25185] [INFO] Starting gunicorn 20.0.4
[2021-03-19 17:13:06 +0000] [25185] [INFO] Listening at: http://0.0.0.0:5000 (25185)
[2021-03-19 17:13:06 +0000] [25185] [INFO] Using worker: gevent
[2021-03-19 17:13:06 +0000] [25193] [INFO] Booting worker with pid: 25193
[2021-03-19 17:13:06 +0000] [25194] [INFO] Booting worker with pid:

0 Votes 0 ·

Hi @MohammadVahed-9121

Sorry for the late response. I did not see a notification for your response on this thread. If you are still facing this issue please send us an email at azcommunity@microsoft.com with this Q&A thread link, your subscription ID, and subject as "Attn: Grace' so we can open a support case for you to investigate further.

Thanks,

Grace

0 Votes 0 ·