Skip to content

Commit

Permalink
make it uwsgi friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
fdev31 committed Jul 8, 2017
1 parent 7b6b4e2 commit 30d2bf4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pasttle.ini
Expand Up @@ -37,3 +37,13 @@ debug = true

; What pygments style to load
; pygments_style = tango

[uwsgi]
static-map=/images=/src/pasttle/views/images
; cant's set more than one static map, it raises python parsing exception
plugin=python
pp=src
wsgi=pasttle.server
http-socket=0.0.0.0:9669
; autoreload=yes
; py-tracebacker=1
11 changes: 11 additions & 0 deletions run_with_uwsgi
@@ -0,0 +1,11 @@
#!/usr/bin/sh
if [ $# -gt 1 ]; then
echo "Invalid syntax: $0 <virtual environment path>"
exit 1
fi

if [ -n "$1" ]; then
OPT="-H $*"
fi

exec uwsgi pasttle.ini --plugin python $OPT

0 comments on commit 30d2bf4

Please sign in to comment.