Skip to content

Instantly share code, notes, and snippets.

@bitwisecook
Created August 10, 2017 12:36
Show Gist options
  • Save bitwisecook/f34bc76a69be03cfd89cdc6f646f8dff to your computer and use it in GitHub Desktop.
Save bitwisecook/f34bc76a69be03cfd89cdc6f646f8dff to your computer and use it in GitHub Desktop.
uWSGI INI template for nginx+uWSGI+flask
[uwsgi]
# application's base folder
appname = app
base = /var/www/app
# python module to import
app = app
module = %(app)
chdir = %(base)
# uwsgi plugin
plugin = python3
{# home = %(base)/venv #}
{# pythonpath = %(base) #}
{# virtualenv = %(base)/venv #}
# socket file's location
socket = /run/uwsgi/app/%(appname)/socket
# permissions for the socket file
uid = uwsgi
gid = uwsgi
chmod-socket = 666
chown-socket = uwsgi
chgrp-socket = uwsgi
# the variable that holds a flask application inside the module imported at line #6
callable = app
# location of log files
logto = /var/log/uwsgi/%(appname).log
# pid
pidfile = /run/uwsgi/app/%(appname)/pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment