From 0effd2b6b8143b0e6bf48b6176eaaa437af988bc Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 2 Oct 2018 15:16:50 +0300 Subject: [PATCH 1/3] Setup logrotate config rights --- run-document-server.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index c4ad86f..5e2585f 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -272,6 +272,10 @@ for i in ${CONF_DIR} ${LOG_DIR} ${LIB_DIR} ${DATA_DIR}; do chmod -R 755 "$i" done +#setup logrotate config rights +chmod 644 ${CONF_DIR}/logrotate/* +chown root:root ${CONF_DIR}/logrotate/* + if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then read_setting From 23d320dc2a705dfb4450455a0c24f9f8841104b6 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 2 Oct 2018 19:36:14 +0300 Subject: [PATCH 2/3] Fix minishift startup --- Dockerfile | 2 +- run-document-server.sh | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a59c52c..038c756 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,6 +70,6 @@ RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/onlyoffice.list && \ rm -rf /var/log/onlyoffice && \ rm -rf /var/lib/apt/lists/* -VOLUME /etc/onlyoffice /var/log/onlyoffice /var/lib/onlyoffice /var/www/onlyoffice/Data /var/lib/postgresql /usr/share/fonts/truetype/custom +VOLUME /var/log/onlyoffice /var/lib/onlyoffice /var/www/onlyoffice/Data /var/lib/postgresql /usr/share/fonts/truetype/custom ENTRYPOINT /app/onlyoffice/run-document-server.sh diff --git a/run-document-server.sh b/run-document-server.sh index 5e2585f..397323f 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -267,15 +267,11 @@ done mkdir -p ${DS_LOG_DIR}-example # change folder rights -for i in ${CONF_DIR} ${LOG_DIR} ${LIB_DIR} ${DATA_DIR}; do +for i in ${LOG_DIR} ${LIB_DIR} ${DATA_DIR}; do chown -R onlyoffice:onlyoffice "$i" chmod -R 755 "$i" done -#setup logrotate config rights -chmod 644 ${CONF_DIR}/logrotate/* -chown root:root ${CONF_DIR}/logrotate/* - if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then read_setting From 2b2f409edf65c4385b900cdec7968540c02265a6 Mon Sep 17 00:00:00 2001 From: Pavel Lobashov Date: Mon, 22 Oct 2018 10:50:30 +0300 Subject: [PATCH 3/3] Fix issue #92 Thanks to @snorre-k See: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92#issuecomment-431655508 In short - on some Linux system (Ubuntu at least) it container stopped - /var/run/rabbitmq dir is not cleared up. Need to manually clear it on start. --- run-document-server.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index 397323f..40a7c27 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -302,6 +302,8 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then update_rabbitmq_setting else LOCAL_SERVICES+=("rabbitmq-server") + # allow Rabbitmq startup after container kill + rm -rf /var/run/rabbitmq fi if [ ${REDIS_SERVER_HOST} != "localhost" ]; then