diff --git a/docker-compose.yml b/docker-compose.yml index 8fb61b51..23b8922f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,6 @@ services: - WO_BROKER - WO_DEV - WO_DEV_WATCH_PLUGINS - - WO_EXTERNAL_AUTH_ENDPOINT restart: unless-stopped oom_score_adj: 0 broker: @@ -53,6 +52,5 @@ services: environment: - WO_BROKER - WO_DEBUG - - WO_EXTERNAL_AUTH_ENDPOINT restart: unless-stopped oom_score_adj: 250 diff --git a/webodm.sh b/webodm.sh index 4a044ba0..5146101c 100755 --- a/webodm.sh +++ b/webodm.sh @@ -130,9 +130,9 @@ case $key in shift # past argument shift # past value ;; - --external-auth-endpoint) - WO_EXTERNAL_AUTH_ENDPOINT="$2" - export WO_EXTERNAL_AUTH_ENDPOINT + --settings) + WO_SETTINGS=$(realpath "$2") + export WO_SETTINGS shift # past argument shift # past value ;; @@ -176,7 +176,7 @@ usage(){ echo " --broker Set the URL used to connect to the celery broker (default: $DEFAULT_BROKER)" echo " --detached Run WebODM in detached mode. This means WebODM will run in the background, without blocking the terminal (default: disabled)" echo " --gpu Use GPU NodeODM nodes (Linux only) (default: disabled)" - echo " --external-auth-endpoint External authentication endpoint (default: disabled)" + echo " --settings Path to a settings.py file to enable modifications of system settings (default: None)" exit } @@ -346,7 +346,7 @@ start(){ echo "SSL insecure port redirect: $WO_SSL_INSECURE_PORT_REDIRECT" echo "Celery Broker: $WO_BROKER" echo "Default Nodes: $WO_DEFAULT_NODES" - echo "External auth endpoint: $WO_EXTERNAL_AUTH_ENDPOINT" + echo "Settings: $WO_SETTINGS" echo "================================" echo "Make sure to issue a $0 down if you decide to change the environment." echo "" @@ -409,6 +409,14 @@ start(){ echo "Will enable SSL ($method)" fi + if [ ! -z "$WO_SETTINGS" ]; then + if [ ! -e "$WO_SETTINGS" ]; then + echo -e "\033[91mSettings file does not exist: $WO_SETTINGS\033[39m" + exit 1 + fi + command+=" -f docker-compose.settings.yml" + fi + command="$command up" if [[ $detached = true ]]; then diff --git a/webodm/settings.py b/webodm/settings.py index 9774338f..a09aba70 100644 --- a/webodm/settings.py +++ b/webodm/settings.py @@ -391,7 +391,8 @@ CACHES = { # before it should be considered offline NODE_OFFLINE_MINUTES = 5 -EXTERNAL_AUTH_ENDPOINT = os.environ.get('WO_EXTERNAL_AUTH_ENDPOINT', '') +EXTERNAL_AUTH_ENDPOINT = '' +RESET_PASSWORD_LINK = '' # Number of hours before tasks are automatically deleted # from an account that is exceeding a disk quota @@ -405,3 +406,8 @@ try: from .local_settings import * except ImportError: pass + +try: + from .settings_override import * +except ImportError: + pass \ No newline at end of file diff --git a/webodm/settings_override.py b/webodm/settings_override.py new file mode 100644 index 00000000..79c0d64e --- /dev/null +++ b/webodm/settings_override.py @@ -0,0 +1,2 @@ +# Do not touch. This file can be bind-mount replaced +# by docker-compose for customized settings \ No newline at end of file