简体   繁体   中英

Managing and understand uWSGI in emperor mode to run my flask application

So I have a Flask application that I have made and i've configured uwsgi in my ini file that runs my app. I've been trying to figure out how to use emperor mode to run my app because I want to run another app with it in the future that would do the same thing. So far all the tutorials that I have seen use nginx and a conf file in etc/init. I asked my mate and he said I don't need to make a conf file because ubuntu doesn't use upstart anymore (or something like that).

Soooo my question is, I've run

uwsgi --emperor me.ini

It works and I can open the port and it works. The problem is I don't know how to manage emperor mode and tell it what to do specifically, I know that there is a conf file but do i need to make one? Right now my command just searches for me.ini in the directory and runs it or at least that's what I think it does and i'm guessing me.ini is a vassal. I also don't know what to do with the number of processes..

My wsgi file contains.

from Flaskapp import application

if __name__ == "__main__":
    application.run()

My me.ini contains

[uwsgi]
module = wsgi

master = true
processes = 5

http-socket = :5000
chmod-socket = 660
vacuum = true

die-on-term = true

I figured out the answer to this question already. I didn't really need a conf file, just made a vassals folder and threw in my .ini in there. You can also make a .ini for emperor mode as well to tell it what to do instead of typing it in the command line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM