[Flask] The big picture: nginx + gunicorn + flask

Clint Olsen clint.olsen at gmail.com
Tue Feb 26 18:54:20 EST 2019


Hi Ulrich:

I had only briefly been introduced to blueprints when I was reading Richard
Picard's Explore Flask site. I will definitely check this out. The official
docs additionally mention "app-dispatch" at
http://flask.pocoo.org/docs/1.0/patterns/appdispatch/#app-dispatch which
may also be applicable.

Thank you,

-Clint

On Tue, Feb 26, 2019 at 4:41 AM ulrich <ub at artfacts.net> wrote:

> hey clint,
>
>
> On 2/24/19 12:23 AM, Clint Olsen wrote:
>
> Hi:
>
> It's taken me awhile, but I actually have created a small webapp that
> actually does something useful, and Flask made it's part pretty
> straightforward.
>
> However, now that I've created a single webapp, the question arises: How
> should an app coexist with others to potentially make up an entire website?
>
> I found some helpful docs over at:
>
> http://exploreflask.com/en/latest/organizing.html
>
> This is about the level of complexity I have now (obviously very basic):
>
> app.pystatic/templates/
>
> Someone who had developed with Django got me started with a nginx +
> gunicorn + flask template to get things rolling.
>
>
> However, in the end I just have gunicorn calling my webapp.
>
> i guess in the end you'll always have your web-app wrapped by an
> app-server of some sort.
>
>
> This doesn't easily scale if I have to have nginx rules -> gunicorn
> instances for every app.
>
> depends how you imagine to scale, but nginx rules can be automated too.
> with ansible for example.
>
> when you say "every app" here, i realize, you might be talking about
> composing/organizing a somewhat monolithic APP. have you looked into
> blueprints? that might be just what you're looking for.
>
> http://flask.pocoo.org/docs/1.0/blueprints/
>
> if you really do mean a multitude of small apps, uswgi for example has
> "emperor" mode for multi-app deployment. possibly gunicorn has a similar
> feature.
>
> https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
>
> I realize that these things are a bit outside the scope of Flask. I
> appreciate the detail at the app level, but now I need to step back and see
> how it all comes together. Any pointers would be appreciated.
>
> hope that helps.
>
> cheers,
>
> ub
>
>
> Thanks,
>
> -Clint
>
> _______________________________________________
> Flask mailing listFlask at python.orghttps://mail.python.org/mailman/listinfo/flask
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20190226/b488d3a7/attachment.html>


More information about the Flask mailing list