From 00a0e6bf4ac01a772d7800e667b15bffc9dd034b Mon Sep 17 00:00:00 2001 From: Nico Geyso Date: Wed, 10 Dec 2014 00:41:49 +0100 Subject: Updated README --- README | 21 +++++++++++++++++++-- nginx.cfg | 6 +++--- uwsgi.ini | 10 ++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 uwsgi.ini diff --git a/README b/README index 83a0b9c..fd66c17 100644 --- a/README +++ b/README @@ -5,16 +5,33 @@ Klausuren können über ein Webinterface einfach hoch- und heruntergezuladen werden. Fit ist in Python2 mit Hilfe von Flask geschrieben. -Setup -------- +Setup (dev) +----------- + $ git clone git://git.spline.de/klausurenarchiv # Source-Code herunterladen $ cd klausurenarchiv $ cp config.cfg.dist config.cfg # Konfigurationsdatei erstellen $ vim/emacs/nano config.cfg + $ virtualenv2 env + $ . env/bin/activate $ pip install -r requirements.txt # Abhängikeiten installieren $ python manage.py runserver # Test-Server starten +Deployment Debian Wheezy +------------------------ + + $ cd /var/www/ + $ git clone git://git.spline.de/klausurenarchiv # Source-Code herunterladen + $ cd klausurenarchiv + $ cp config.cfg.dist config.cfg # Konfigurationsdatei erstellen + $ vim/emacs/nano config.cfg + $ apt-get install python-flask python-flaskext.wtf python-virtualenv uwsgi uwsgi-plugin-python + $ pip install flask-script + $ cp nginx.cfg ... + $ cp uwsgi.ini ... + + Config ------ * MAX_CONTENT_LENGTH - Maximale Größe von Dateien beim Upload (in Bytes) diff --git a/nginx.cfg b/nginx.cfg index d2c98b9..d510ef0 100644 --- a/nginx.cfg +++ b/nginx.cfg @@ -17,7 +17,7 @@ server { } location /403 { - try_files $uri @fit; + try_files $uri @klausuren; } location / { @@ -26,10 +26,10 @@ server { #allow 192.168.0.0/16; #deny all; - try_files $uri @fit; + try_files $uri @klausuren; } - location @fit { + location @klausuren { include uwsgi_params; uwsgi_pass unix:/tmp/uwsgi.sock; } diff --git a/uwsgi.ini b/uwsgi.ini new file mode 100644 index 0000000..c80c96b --- /dev/null +++ b/uwsgi.ini @@ -0,0 +1,10 @@ +[uwsgi] +plugins = python +socket = /run/uwsgi/app/klausuren/socket +master = true +processes = 2 +pythonpath = /var/www//env/lib/python2.7/site-packages/ +chdir = /var/www/ +uid = www-data +gid = www-data +module = manage:app -- cgit v1.2.3-1-g7c22