From 9ad9bc8acaa508317bebd9e2634ffac7ba7157e3 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Thu, 19 Jul 2018 16:20:20 +0300 Subject: [PATCH 1/2] Use boolean type for JWT_ENABLED --- run-document-server.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/run-document-server.sh b/run-document-server.sh index a7799cc..c4ad86f 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -151,9 +151,9 @@ update_redis_settings(){ update_jwt_settings(){ if [ "${JWT_ENABLED}" == "true" ]; then - ${JSON} -I -e "this.services.CoAuthoring.token.enable.browser = '${JWT_ENABLED}'" - ${JSON} -I -e "this.services.CoAuthoring.token.enable.request.inbox = '${JWT_ENABLED}'" - ${JSON} -I -e "this.services.CoAuthoring.token.enable.request.outbox = '${JWT_ENABLED}'" + ${JSON} -I -e "this.services.CoAuthoring.token.enable.browser = ${JWT_ENABLED}" + ${JSON} -I -e "this.services.CoAuthoring.token.enable.request.inbox = ${JWT_ENABLED}" + ${JSON} -I -e "this.services.CoAuthoring.token.enable.request.outbox = ${JWT_ENABLED}" ${JSON} -I -e "this.services.CoAuthoring.secret.inbox.string = '${JWT_SECRET}'" ${JSON} -I -e "this.services.CoAuthoring.secret.outbox.string = '${JWT_SECRET}'" @@ -162,8 +162,8 @@ update_jwt_settings(){ ${JSON} -I -e "this.services.CoAuthoring.token.inbox.header = '${JWT_HEADER}'" ${JSON} -I -e "this.services.CoAuthoring.token.outbox.header = '${JWT_HEADER}'" - if [ -f "${ONLYOFFICE_EXAMPLE_CONFIG}" ]; then - ${JSON_EXAMPLE} -I -e "this.server.token.enable = '${JWT_ENABLED}'" + if [ -f "${ONLYOFFICE_EXAMPLE_CONFIG}" ] && [ "${JWT_ENABLED}" == "true" ]; then + ${JSON_EXAMPLE} -I -e "this.server.token.enable = ${JWT_ENABLED}" ${JSON_EXAMPLE} -I -e "this.server.token.secret = '${JWT_SECRET}'" ${JSON_EXAMPLE} -I -e "this.server.token.authorizationHeader = '${JWT_HEADER}'" fi From 2c4668d9e30b3ccef6999e020143a6293f9aab7a Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Mon, 27 Aug 2018 15:47:16 +0300 Subject: [PATCH 2/2] Update nodejs to version 8.x --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index afb7ae4..a59c52c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ apt-get -yq install wget apt-transport-https curl locales && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x8320ca65cb2de8e5 && \ locale-gen en_US.UTF-8 && \ - curl -sL https://deb.nodesource.com/setup_6.x | bash - && \ + curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get -y update && \ apt-get -yq install \ adduser \