launch.sh 417 Bytes
Newer Older
1
#!/usr/bin/env bash
Administrator committed
2 3 4 5

port=34001
ip=127.0.0.1

6 7 8 9 10 11 12
if [ -n "$1" ]
then
    ip=$1
fi
if [ -n "$2" ]
then
    port=$2
Administrator committed
13
fi
14

Administrator committed
15 16
current_path=$(pwd)
export PYTHONPATH="$current_path:$current_path/lib:$PYTHONPATH"
17 18 19 20 21 22 23
export DJANGO_SETTINGS_MODULE=outils.settings
# Collect static files
echo yes | django-admin collectstatic
# Make sure couchdb databases exist
python manage.py couchdb
# Run server
django-admin runserver "$ip:$port"
Administrator committed
24 25