Séparation du fichier de configuration à l'aide de django-split-settings

This commit is contained in:
Olivier DOSSMANN
2017-08-25 13:08:01 +01:00
parent 96de9e859c
commit ae1a3edd99
12 changed files with 164 additions and 134 deletions

View File

@ -5,10 +5,10 @@ set -e
chown -R guest "$DB_DIR"
if [ "$1" = 'dev' ]; then
export DJANGO_SETTINGS_MODULE=collection.settings
export DJANGO_ENV='development'
exec python3 manage.py runserver 0.0.0.0:8000
elif [ "$1" = 'prod' ]; then
export DJANGO_SETTINGS_MODULE=collection.production
export DJANGO_ENV='production'
# Collect static files
python3 manage.py collectstatic --noinput --clear -v 0
exec uwsgi --ini uwsgi.ini --pythonpath "$APPS_DIR" --static-map=/static/="$STATIC_ROOT"