Run a flask application that uses a virtualenv and Flask-Login with gunicorn #2999
Unanswered
artgoldberg
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Gunicorn folks
Cool software you've created!
I've created my first flask application, and configured it to use a virtualenv, as directed. It also uses Flask-Login to control access and manage user sessions. The latest production versions are used for all packages.
Following the Flask instructions, I'm using Gunicorn as the production WSGI server.
But I'm running into some problems:
flask
run command once I start using Gunicorn? Or is there a convenient way to use both?flask
run command. This blog post recommends that the flask logger get pointed to the gunicorn loggers like this. Is this a best practice? If not, what do you recommend?Is Gunicorn compatible with Flask-Login? If a user's login action is handled by a Gunicorn which saves the user's
User
instance in a global data structure, how does another Gunicorn process know about this logged in user?What's the right way to configure the
virtualenv
for Gunicorn? The Using Virtualenv documentation says "you just need to use one of the three Gunicorn scripts that was installed intovenvs/webapp/bin
". But I don't find any scripts there.Thanks
Arthur
Beta Was this translation helpful? Give feedback.
All reactions