diff --git a/docker/README.md b/docker/README.md index eb7bf71e..e9f05aa8 100644 --- a/docker/README.md +++ b/docker/README.md @@ -12,6 +12,7 @@ Several options, such as the timezone and admin password are customizable using * ``DOCKER_SAL_TZ``: The desired [timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Defaults to ``Europe/London``. * ``DOCKER_SAL_ADMINS``: The admin user's details. Defaults to ``Docker User, docker@localhost``. * ``DOCKER_SAL_PLUGIN_ORDER``: The order plugins are displayed in. Defaults to ``Activity,Status,OperatingSystem,Uptime,Memory``. +* ``DOCKER_SAL_DEBUG``: Whether debug mode is enabled or not. Valid values are ``true`` and ``false``. Defaults to ``false``. If you require more advanced settings, for example if you want to hide certain plugins from certain Business Units or if you have a plugin that needs settings, you can override ``settings.py`` with your own. A good starting place can be found on this image's [Github repository](https://github.com/grahamgilbert/macadmins-sal/blob/master/settings.py). diff --git a/docker/settings_import.py b/docker/settings_import.py index a55e546d..f0947000 100644 --- a/docker/settings_import.py +++ b/docker/settings_import.py @@ -2,6 +2,12 @@ from os import getenv import locale +# Read the DEBUG setting from env var +if getenv('DOCKER_SAL_DEBUG').lower == 'true': + DEBUG = True +else: + DEBUG = False + # Read list of admins from $DOCKER_SAL_ADMINS env var admin_list = [] if getenv('DOCKER_SAL_ADMINS'):