Derry Spann | {hostname}

Get started guide to using UWSGI

Install uwsgi package run uwsgi --socket --protocol=http -w wsgi:application

create an ini for handling the uwsgi server

# Assign the python application to the wsgi module to be called when server is running
module = wsgi:application

# Start Wsgi Master process and worker processes which serves the requests
master = true
processes = 5

# Create a secure socket file connection for nginx to proxy requests
socket = serve_uwsgi.sock
chmod-socket = 600
vacuum = true

# Ensures the uwsgi server ends when the system fails
die-on-term = true

Auto start uWsgi when system boots

Description=uWSGI instance to serve pycasso app

ExecStart=/root/.pyenv/bin/uwsgi --ini serve_uwsgi.ini