Simplest way to deploy a Flask app

github logo ・1 min read

Hi !

I wrote a simple Flask app using flask and sqlalchemy which run pretty well on localhost but I would like to deploy it. The problem is that I don't have any clue on how to deploy it..

Could somebody explain me the simplest way to deploy my Flask app?

Thanks !

EDIT
I'm on Windows

twitter logo DISCUSS (7)
markdown guide
 

Mitch,

Thanks much for posting this detailed guideline. By any chance are you planning to do an updated blog post ? I attempted to follow - your blog post to the very last detail, and could not get the Flask App deployed.

There were a couple of errors specific to apache - and after a LOT of research later, it was just a dead end for me.

Thanks
Sandeep.

 

I don't think he'll receive a notification since it's not a reply to his comment, let me tag him ! @mitchjacksontech

 

Sandeep, have you been able to solve the problem? If not and you're interested in revisiting, perhaps I can help with the apache errors. You can find my e-mail address on my dev.to profile

 

I had the same problem when I deployed my first Flask app. To approach the problem, I created a very simple small application, and worked through the kinks until I got it deployed in a way I was happy with. Only then did I move to deploying my full application.

I documented the process in this blog post. Perhaps it will be some help.

 

Flask's own documentation give you a few deployment options.

You can try Heroku's free plan:

 

You might also take a look at Netlify. It's a well documented tool for deploying side projects quickly and even beyond:
netlify.com/docs/#python

 

You will need a WSGI server. Have a look at this tutorial. It shows you how to deploy a flask app using Nginx and uwsgi.

Classic DEV Post from Jun 9

Explain CI/CD like I'm five.

Explanation of CI/CD, discuss, developer

Pierre Bouillon profile image
Developer, student, tech enthusiast and coffee junky. I would be glad to speak with you!
Join dev.to