Add --settings, drop --external-auth-endpoint

pull/1371/head
Piero Toffanin 2023-09-08 15:55:42 -04:00
rodzic 73052fb2ec
commit 83419a7dab
4 zmienionych plików z 22 dodań i 8 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -0,0 +1,2 @@
# Do not touch. This file can be bind-mount replaced
# by docker-compose for customized settings