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