Python3 Uwsgi
sudo pip3 install uwsgi
sudo mkdir /etc/uwsgi
sudo mkdir /etc/uwsgi/vassals
sudo nano /etc/systemd/system/emperor.uwsgi.service
Contents of emperor.uwsgi.service file
---------------------------------------------------------------------------------------
[Unit]
Description=uWSGI Emperor
After=syslog.target
[Service]
ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/emperor.ini
# Requires systemd version 211 or newer
RuntimeDirectory=uwsgi
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all
[Install]
WantedBy=multi-user.target
--------------------------------------------------------------------------------
systemctl start emperor.uwsgi.service # start as service
systemctl enable emperor.uwsgi.service # add service at boot
touch /etc/uwsgi/emperor.ini
sudo nano /etc/uwsgi/emperor.ini
Contents of emperor.ini file
----------------------------------------------------------------------------------------------
[uwsgi]
emperor = /etc/uwsgi/vassals
vassal-set = processes=8
vassal-set = enable-metrics=1
------------------------------------------------------------------------------------------