deploying flask app with uwsgi and flask-script Manager

前端 未结 2 2338
攒了一身酷
攒了一身酷 2021-02-20 14:07

Traditionally, I have configured the UWSGI configuration file to call an application like below:

mydirectory/uwsgi_application.ini
...
#python module to import
a         


        
相关标签:
2条回答
  • 2021-02-20 14:39

    I am also using the flask-script manager , so what i did was

    • created a wsgi.py .which was like.

      from app import * application = create_app("development")

    • then uwsgi --wsgi-file wsgi.py --callable application

    Note: the callable is the flask object name in the wsgi.py.

    0 讨论(0)
  • 2021-02-20 14:52

    You don't use Flask-Script with uWSGI. You point it at the app directly. Or in your case, you point it at a call to the app factory. The simplest example is:

    uwsgi --module 'myapp:create_app()'
    
    0 讨论(0)
提交回复
热议问题