From 2702289737901117b5e84a8c334b0c72124e5ece Mon Sep 17 00:00:00 2001 From: charnesp Date: Wed, 5 Oct 2022 13:04:11 +0200 Subject: [PATCH] Enable autoassembly using env variables Add option to use environment variables to enable autoassembly on the docker: - `AUTO_ASSEMBLY_ENABLED` set to `true` (default: `false`) - `AUTO_ASSEMBLY_INTERVAL` can be set (default: `20m`) --- run-document-server.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index fd183a3..c5640c8 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -77,6 +77,9 @@ NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$(ulimit -n)} JWT_ENABLED=${JWT_ENABLED:-true} +AUTO_ASSEMBLY_ENABLED=${AUTO_ASSEMBLY_ENABLED:-false} +AUTO_ASSEMBLY_INTERVAL=${AUTO_ASSEMBLY_INTERVAL:-20m} + # validate user's vars before usinig in json if [ "${JWT_ENABLED}" == "true" ]; then JWT_ENABLED="true" @@ -343,6 +346,12 @@ update_ds_settings(){ ${JSON} -I -e "if(this.wopi===undefined)this.wopi={}" ${JSON} -I -e "this.wopi.enable = true" fi + + if [ "${AUTO_ASSEMBLY_ENABLED}" == "true" ]; then + ${JSON} -I -e "if(this.services.CoAuthoring.autoAssembly===undefined)this.services.CoAuthoring.autoAssembly={};" + ${JSON} -I -e "this.services.CoAuthoring.autoAssembly.enable = true" + ${JSON} -I -e "this.services.CoAuthoring.autoAssembly.interval = '${AUTO_ASSEMBLY_INTERVAL}'" + fi } create_postgresql_cluster(){