summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Geyso <nico.geyso@fu-berlin.de>2014-12-10 00:41:49 +0100
committerNico Geyso <nico.geyso@fu-berlin.de>2014-12-10 00:41:49 +0100
commit00a0e6bf4ac01a772d7800e667b15bffc9dd034b (patch)
tree1b01c2c7b85369e3b4d6137158b7d27d3ccdaace
parent2ef9b0b6864959b0808ca12390f0a36e65eb6e1a (diff)
downloadklausuren-00a0e6bf4ac01a772d7800e667b15bffc9dd034b.tar.gz
klausuren-00a0e6bf4ac01a772d7800e667b15bffc9dd034b.tar.bz2
klausuren-00a0e6bf4ac01a772d7800e667b15bffc9dd034b.zip
Updated README
-rw-r--r--README21
-rw-r--r--nginx.cfg6
-rw-r--r--uwsgi.ini10
3 files changed, 32 insertions, 5 deletions
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/<name>/env/lib/python2.7/site-packages/
+chdir = /var/www/<name>
+uid = www-data
+gid = www-data
+module = manage:app