From 6c69d9f622aa26e7ffe919a7079d6e2ade603292 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 20 Mar 2017 16:56:56 +0100 Subject: [PATCH] Prepare for uWSGI usage. --- .gitignore | 2 ++ README.md | 4 ++++ index.py => dss.py | 0 index.wsgi | 7 ------- uwsgi.ini.example | 7 +++++++ 5 files changed, 13 insertions(+), 7 deletions(-) rename index.py => dss.py (100%) delete mode 100644 index.wsgi create mode 100644 uwsgi.ini.example diff --git a/.gitignore b/.gitignore index ae65216..b9e95e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ # config file config.cfg +# uwsgi settings +uwsgi.ini diff --git a/README.md b/README.md index fea4f26..8ee48f8 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ TBA * py-ldap >= 2.4.15 * py-redis >= 2.10 +## uWSGI + +To use dss with uWSGI create a file called uwsgi.ini from the provided example and change the socket and optinally the chroot setting. You can use `/usr/bin/uwsgi --ini /path/to/dss/uwsgi.ini` to start your instance. + ## Misc Source code is under MIT license, powered by Flask and Bootstrap. diff --git a/index.py b/dss.py similarity index 100% rename from index.py rename to dss.py diff --git a/index.wsgi b/index.wsgi deleted file mode 100644 index 4aeaa3f..0000000 --- a/index.wsgi +++ /dev/null @@ -1,7 +0,0 @@ -import sys -import os - -sitepath = os.path.realpath(os.path.dirname(__file__)) -sys.path.insert(0, sitepath) - -from index import app as application diff --git a/uwsgi.ini.example b/uwsgi.ini.example new file mode 100644 index 0000000..6ac8e1f --- /dev/null +++ b/uwsgi.ini.example @@ -0,0 +1,7 @@ +[uwsgi] +socket = 127.0.0.1:5001 +#chroot = /path/to/dss/ +wsgi-file = dss.py +callable = app +processess = 4 +threads = 2