Install uwsgi:
apt-get install build-essential python sudo pip3 install uwsgi
Create a service in /etc/systemd/system/uwsgi.service
[Unit] Description=uWSGI Emperor service [Service] ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown www-data:www-data /run/uwsgi' ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites Restart=always KillSignal=SIGQUIT Type=notify NotifyAccess=all [Install] WantedBy=multi-user.target
Create an emperor file at:
sudo mkdir /etc/uwsgi sudo mkdir /etc/uwsgi/sites sudo vi /etc/uswsgi/sites/stocks.ini
And then add:
[uwsgi] project = stocks uid = bpopp base = /usr/share/nginx/html/django chdir = %(base)/%(project) module=%(project).wsgi:application master = true processes = 5 threads=2 http = 0.0.0.0:8001