[Flask] Deploying Flask on Debian
Adam Steer
Adam.Steer at anu.edu.au
Tue May 3 16:33:25 EDT 2016
Hi Alex
(noting also Anthony’s quick response)
I’ve just jumped through this same set of hoops, going from ‘no idea’ to ‘flask = deployed on WSGI’, on ubuntu (nearly debian) and CentOS.
After the fact, these docs make sense:
http://flask.pocoo.org/docs/0.10/deploying/mod_wsgi/
…but starting out I was completely at a loss about where to start. I think the Flask docs assume you just try it, and see :) So the examples are sometimes reliant on the developer either already knowing a bunch, or trying things and learning by breaking things. Which is OK.
I drew heavily on the deployment style here:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps
and here:
http://www.jakowicz.com/flask-apache-wsgi/
…but i did find the process pretty confusing. When I get into the office I can send some documented flask/wsgi/apache config files if that would help.
Just a quick note, it’s still helpful to use a virtual environment, because you never know when you might need to transport your app someplace else - and you can bundle up all the things your project needs.
Cheers
Adam
> On 4 May 2016, at 6:05 AM, Alex Hall <ahall at autodist.com> wrote:
>
> Hello list,
> My work has a Google Cloud account, so my boss just made me a Debian server. Being virtual, I can't physically access it, but I've got SSH and SCP, so same thing. No remote GUI, though, just command line.
>
> I've been looking up how to deploy Flask on Linux, Debian specifically, for a couple hours. I'm getting a *lot* of hits, but nothing that seems to be in line with anything else. Some tell me to use WSGI (which I expected), but others say mod_wsgi, and others UWSGI. Mod_wsgi might mean, some say, compiling it for Python3, but I'm on Python 2.7.9? Most assume I'm using a virtual environment, which I'm not, because Python and other web projects are the only things on this server. The Flask docs talk about UWSGI, then something called MGinx? I'm using Apache2, again on Debian 8.
>
> Is there a single tutorial or article that most people recommend? I'm not very experienced with Debian, but I'm fine with a command line interface in general. I've got Flask, Flask-WTF, and the pyodbc module I'll need, and now just want to get Flask running with Apache2 so Apache can serve my Flask app. Thanks.
>
> --
> Alex Hall
> Automatic Distributors, IT department
> ahall at autodist.com
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
More information about the Flask
mailing list