diff --git a/ckan.sh b/ckan.sh index 9eec222..b5c1fde 100755 --- a/ckan.sh +++ b/ckan.sh @@ -33,6 +33,11 @@ cp ${SOURCE_DIR}/srv/ckan/conf/who.ini /srv/ckan/conf/who.ini cp ${SOURCE_DIR}/srv/ckan/update-ip.sh /srv/ckan/update-ip.sh /srv/ckan/update-ip.sh +# 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/ckan/conf/ckan.ini +fi + # Populate database docker run --rm -h ckan --link postgres --link redis --link solr -v /srv/ckan/conf:/etc/ckan -v /srv/ckan/data:/srv/ckan/storage ckan paster --plugin=ckan db init -c /etc/ckan/ckan.ini docker run --rm -h ckan --link postgres --link redis --link solr -v /srv/ckan/conf:/etc/ckan -v /srv/ckan/data:/srv/ckan/storage ckan paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini diff --git a/ckan/srv/ckan/conf/ckan.ini b/ckan/srv/ckan/conf/ckan.ini index 22272ec..1dc7cdc 100644 --- a/ckan/srv/ckan/conf/ckan.ini +++ b/ckan/srv/ckan/conf/ckan.ini @@ -14,7 +14,7 @@ [DEFAULT] # WARNING: *THIS SETTING MUST BE SET TO FALSE ON A PRODUCTION ENVIRONMENT* -debug = false +debug = true [server:main] use = egg:Paste#http