From a218ebe7d573b8241762a418e5c2ac2af491160c Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 29 Nov 2017 21:27:11 +0100 Subject: [PATCH] Enable debugging for Pandora --- pandora.sh | 5 +++++ pandora/srv/pandora/pandora/local_settings.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora.sh b/pandora.sh index 4128530..7225709 100755 --- a/pandora.sh +++ b/pandora.sh @@ -46,6 +46,11 @@ cp ${SOURCE_DIR}/pandora/srv/pandora/pandora/config.jsonc /srv/pandora/pandora/c cp /srv/pandora/pandora/gunicorn_config.py.in /srv/pandora/pandora/gunicorn_config.py envsubst <${SOURCE_DIR}/pandora/srv/pandora/pandora/local_settings.py >/srv/pandora/pandora/local_settings.py +# Set "production values" (increases performance) only if the DEBUG environment variable is not set +if [ ${DEBUG:-0} -eq 0 ]; then + sed -i 's/DEBUG = True/DEBUG = False/' /srv/pandora/pandora/local_settings.py +fi + # Create Pandora OS user adduser --system --group --home /srv/pandora --shell /bin/false pandora chown -R pandora:pandora /srv/pandora diff --git a/pandora/srv/pandora/pandora/local_settings.py b/pandora/srv/pandora/pandora/local_settings.py index 9d8957e..8f42162 100644 --- a/pandora/srv/pandora/pandora/local_settings.py +++ b/pandora/srv/pandora/pandora/local_settings.py @@ -12,6 +12,6 @@ XACCELREDIRECT = True GOOGLE_API_KEY = 'AIzaSyBvIF3D550tlpL6o1xRrDurGo-81VhHlOw' -DEBUG = False +DEBUG = True TEMPLATE_DEBUG = DEBUG -JSON_DEBUG = False +JSON_DEBUG = DEBUG