Enable Sahana debugging using DEBUG env var
This commit is contained in:
parent
b0bcf2d030
commit
0ec4fc5fe0
11
02-sahana.sh
11
02-sahana.sh
@ -44,10 +44,13 @@ chown -R sahana:sahana /srv/sahana
|
||||
cd /srv/sahana
|
||||
sudo -u sahana python web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py
|
||||
|
||||
# Set "production values" (increases performance)
|
||||
sed -i 's/settings.base.migrate = True/settings.base.migrate = False/' /srv/sahana/applications/eden/models/000_config.py
|
||||
sed -i 's/#settings.base.prepopulate = 0/settings.base.prepopulate = 0/' /srv/sahana/applications/eden/models/000_config.py
|
||||
sudo -u sahana python web2py.py -S eden -M -R applications/eden/static/scripts/tools/compile.py
|
||||
# Set "production values" (increases performance). Only if the DEBUG environment variable doesn't exist
|
||||
if [ -z "${DEBUG}" ]; then
|
||||
sed -i 's/settings.base.migrate = True/settings.base.migrate = False/' /srv/sahana/applications/eden/models/000_config.py
|
||||
sed -i 's/settings.base.debug = True/settings.base.debug = False/' /srv/sahana/applications/eden/models/000_config.py
|
||||
sed -i 's/#settings.base.prepopulate = 0/settings.base.prepopulate = 0/' /srv/sahana/applications/eden/models/000_config.py
|
||||
sudo -u sahana python web2py.py -S eden -M -R applications/eden/static/scripts/tools/compile.py
|
||||
fi
|
||||
|
||||
# Create uwsgi and nginx app definition
|
||||
cp ${SOURCE_DIR}/sahana/etc/uwsgi/apps-available/sahana.ini /etc/uwsgi/apps-available/sahana.ini
|
||||
|
@ -63,7 +63,7 @@ settings.base.migrate = True
|
||||
# JS Debug messages are also available in the Console
|
||||
# can also load an individual page in debug mode by appending URL with
|
||||
# ?debug=1
|
||||
settings.base.debug = False
|
||||
settings.base.debug = True
|
||||
|
||||
# Uncomment this to prevent automated test runs from remote
|
||||
# settings.base.allow_testing = False
|
||||
|
Loading…
Reference in New Issue
Block a user