Skip to content

Commit

Permalink
Debug mode exposed in Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamgilbert committed Aug 4, 2015
1 parent fa24297 commit 5516882
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
6 changes: 6 additions & 0 deletions docker/settings_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 5516882

Please sign in to comment.