Dimitris Kougioumtzis Blog About technology

Python3 Uwsgi

Category Python

Posted on Oct. 14, 2018



Python3 Uwsgi


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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

------------------------------------------------------------------------------------------

About

My name is Dimitris Kougioumtzis and i work as a Web developer at Rapidbounce Company

Elsewhere