From 4c6696c0f77de3eb1ff7604316c0b215a4ca3541 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Sun, 24 Sep 2023 15:23:28 +0000 Subject: [PATCH 1/2] add run args to docker Signed-off-by: Simon Smith --- docker/Dockerfile | 1 + docker/startup.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f14f915b..bcc98ed3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -69,6 +69,7 @@ ENV IFRAME="false" ENV SESSION_KEY="" ENV REVERSE_PROXY="false" ENV REVERSE_PROXY_TLS_PORT="" +ENV ARGS="" RUN if ! [ -z "$INCLUDE_MONGODBTOOLS" ] && [ "$INCLUDE_MONGODBTOOLS" != "yes" ] && [ "$INCLUDE_MONGODBTOOLS" != "YES" ] \ && [ "$INCLUDE_MONGODBTOOLS" != "true" ] && [ "$INCLUDE_MONGODBTOOLS" != "TRUE" ]; then \ diff --git a/docker/startup.sh b/docker/startup.sh index f3a30164..a0727193 100644 --- a/docker/startup.sh +++ b/docker/startup.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ -f "meshcentral-data/${CONFIG_FILE}" ]; then - node meshcentral/meshcentral --configfile "${CONFIG_FILE}" + node meshcentral/meshcentral --configfile "${CONFIG_FILE}" ${ARGS} else cp config.json.template meshcentral-data/"${CONFIG_FILE}" if [ -n "$USE_MONGODB" ] && [ "$USE_MONGODB" == "true" ]; then @@ -30,5 +30,5 @@ else node meshcentral/meshcentral --configfile "${CONFIG_FILE}" exit fi - node meshcentral/meshcentral --configfile "${CONFIG_FILE}" --cert "$HOSTNAME" + node meshcentral/meshcentral --configfile "${CONFIG_FILE}" --cert "$HOSTNAME" ${ARGS} fi From 86375207ccfb21284328688a4c7e39692d3135ca Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Sun, 24 Sep 2023 15:44:34 +0000 Subject: [PATCH 2/2] add args to docker readme Signed-off-by: Simon Smith --- docker/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/readme.md b/docker/readme.md index 48cf1e78..06bb43d1 100644 --- a/docker/readme.md +++ b/docker/readme.md @@ -45,6 +45,8 @@ ALLOWPLUGINS=false LOCALSESSIONRECORDING=false # set to enable or disable minification of json, reduces traffic MINIFY=true +# set this value to add extra arguments to meshcentral on startup (e.g --debug ldap) +ARGS= ``` ## docker-compose.yml