1

I'm trying to deploy a Flask app within Azure, using the pre made template created by Azure.

I can't get a simple...

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello():
    return "Hello World!"

if __name__ == '__main__':
    app.run()

To do anything. To simplify further still, even the pre made deployment returns an error...enter image description here

Clearly I'm misunderstanding something very fundamental here. Using FTP I can see the files that Azure is creating - sure does look like there should be a nice little demo site.

What am I doing wrong?

Cheers, Ben

1
  • Now it appears that it's working fine. Deploy a pre-built Flask app, click the link, up it pops just fine. I can't see where I was possibly going wrong - a rare occasion when the fault was not with me, I believe. Commented Nov 21, 2016 at 15:42

2 Answers 2

1

According to your description, I think the issue was caused by some incorrect configuration in the web.config & the Application Settings of your WebApp settings. Please try to refer to the blog to resolve it.

Meanwhile, I don't know what pre made template created by Azure you used. I tried to create a new Azure WebApp for Flask as below.

enter image description here

The file list in the wwwroot path in the Kudu tool or FTP shown as below.

enter image description here

Then, I modified the code views.py in the FlaskWebProject1 directory. And it works. enter image description here

It seems to be more simple. Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

0

I've been figthing the same issue for a while, I have only be able to workaround it by changing the pricing tier associated to the "service plan" to S2 Standard. If I try to use S1 Standard I run into the same issues.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.