diff --git a/Dockerfile b/Dockerfile index d996e71..5585e64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,8 @@ ARG REPO_URL="deb http://download.onlyoffice.com/repo/debian squeeze main" ARG COMPANY_NAME=onlyoffice ARG PRODUCT_NAME=documentserver -ENV COMPANY_NAME=$COMPANY_NAME +ENV COMPANY_NAME=$COMPANY_NAME \ + PRODUCT_NAME=$PRODUCT_NAME RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/ds.list && \ apt-get -y update && \ diff --git a/run-document-server.sh b/run-document-server.sh index b040372..4a689bb 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -49,6 +49,12 @@ JWT_SECRET=${JWT_SECRET:-secret} JWT_HEADER=${JWT_HEADER:-Authorization} JWT_IN_BODY=${JWT_IN_BODY:-false} +if [[ ${PRODUCT_NAME} == "documentserver" ]]; then + REDIS_ENABLED=false +else + REDIS_ENABLED=true +fi + ONLYOFFICE_DEFAULT_CONFIG=${CONF_DIR}/local.json ONLYOFFICE_LOG4JS_CONFIG=${CONF_DIR}/log4js/production.json ONLYOFFICE_EXAMPLE_CONFIG=${CONF_DIR}-example/local.json @@ -461,7 +467,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then if [ ${REDIS_SERVER_HOST} != "localhost" ]; then update_redis_settings - else + elif [ ${REDIS_ENABLED} = "true" ]; then # change rights for redis directory chown -R redis:redis ${REDIS_DATA} chmod -R 750 ${REDIS_DATA} @@ -492,7 +498,9 @@ fi if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then waiting_for_db waiting_for_amqp - waiting_for_redis + if [ ${REDIS_ENABLED} = "true" ]; then + waiting_for_redis + fi update_nginx_settings