From aa9ed1d7cf6ca67bfdb3882d525034eb88b53555 Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Mon, 17 Jan 2022 17:30:36 +0300 Subject: [PATCH 01/16] Correction of resolving the external address of the machine --- run-community-server.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/run-community-server.sh b/run-community-server.sh index 5d3631b..7b5be98 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -805,6 +805,7 @@ if [ "${MAIL_SERVER_ENABLED}" == "true" ]; then if check_ip_is_internal $DOCKER_APP_SUBNET $MAIL_SERVER_API_HOST; then SENDER_IP=$(hostname -i); + echo "$(dig +short myip.opendns.com @resolver1.opendns.com) $MAIL_DOMAIN_NAME" >> /etc/hosts elif [[ "$(dig +short myip.opendns.com @resolver1.opendns.com)" =~ $VALID_IP_ADDRESS_REGEX ]]; then SENDER_IP=$(dig +short myip.opendns.com @resolver1.opendns.com); log_debug "External ip $SENDER_IP is valid"; From 2bc6f0902d7bfa4ec8978734ebe9029ea5e4f582 Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Mon, 17 Jan 2022 20:11:18 +0300 Subject: [PATCH 02/16] Add a variable value check --- run-community-server.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run-community-server.sh b/run-community-server.sh index 7b5be98..3477aad 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -805,7 +805,9 @@ if [ "${MAIL_SERVER_ENABLED}" == "true" ]; then if check_ip_is_internal $DOCKER_APP_SUBNET $MAIL_SERVER_API_HOST; then SENDER_IP=$(hostname -i); - echo "$(dig +short myip.opendns.com @resolver1.opendns.com) $MAIL_DOMAIN_NAME" >> /etc/hosts + if [[ -n ${MAIL_DOMAIN_NAME} ]]; then + echo "$(dig +short myip.opendns.com @resolver1.opendns.com) ${MAIL_DOMAIN_NAME}" >> /etc/hosts + fi elif [[ "$(dig +short myip.opendns.com @resolver1.opendns.com)" =~ $VALID_IP_ADDRESS_REGEX ]]; then SENDER_IP=$(dig +short myip.opendns.com @resolver1.opendns.com); log_debug "External ip $SENDER_IP is valid"; From c5116afebd175eba7b9439f234a0708fd797def4 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Fri, 21 Jan 2022 18:45:17 +0300 Subject: [PATCH 03/16] Feature/Add a separate elasticsearch container (#135) * Add a separate elasticsearch container * Update workspace and groups --- docker-compose.groups.yml | 32 +++++++++++++++++++++-- docker-compose.workspace.yml | 34 ++++++++++++++++++++++--- docker-compose.workspace_enterprise.yml | 34 ++++++++++++++++++++++--- 3 files changed, 92 insertions(+), 8 deletions(-) diff --git a/docker-compose.groups.yml b/docker-compose.groups.yml index b19c2a5..60bb3dc 100644 --- a/docker-compose.groups.yml +++ b/docker-compose.groups.yml @@ -16,9 +16,10 @@ services: - mysql_data:/var/lib/mysql onlyoffice-community-server: container_name: onlyoffice-community-server - image: onlyoffice/communityserver:11.0.0.1458 + image: onlyoffice/communityserver:11.5.4.1582 depends_on: - onlyoffice-mysql-server + - onlyoffice-elasticsearch environment: - ONLYOFFICE_CORE_MACHINEKEY=core_secret - CONTROL_PANEL_PORT_80_TCP=80 @@ -28,6 +29,8 @@ services: - MYSQL_SERVER_HOST=onlyoffice-mysql-server - MYSQL_SERVER_USER=onlyoffice_user - MYSQL_SERVER_PASS=onlyoffice_pass + - ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch + - ELASTICSEARCH_SERVER_HTTPPORT=9200 networks: - onlyoffice ports: @@ -44,11 +47,35 @@ services: - community_letsencrypt:/etc/letsencrypt - /sys/fs/cgroup:/sys/fs/cgroup:ro - ./certs:/var/www/onlyoffice/Data/certs + onlyoffice-elasticsearch: + image: onlyoffice/elasticsearch:7.9.0 + container_name: onlyoffice-elasticsearch + restart: always + environment: + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true" + - "indices.fielddata.cache.size=30%" + - "indices.memory.index_buffer_size=30%" + networks: + - onlyoffice + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65535 + hard: 65535 + volumes: + - es_data:/usr/share/elasticsearch/data + expose: + - "9200" + - "9300" onlyoffice-control-panel: container_name: onlyoffice-control-panel depends_on: - onlyoffice-community-server - image: onlyoffice/controlpanel:2.9.0.351 + image: onlyoffice/controlpanel:3.0.2.395 environment: - ONLYOFFICE_CORE_MACHINEKEY=core_secret expose: @@ -74,3 +101,4 @@ volumes: controlpanel_data: controlpanel_log: mysql_data: + es_data: diff --git a/docker-compose.workspace.yml b/docker-compose.workspace.yml index c491798..06a734b 100644 --- a/docker-compose.workspace.yml +++ b/docker-compose.workspace.yml @@ -16,11 +16,12 @@ services: - mysql_data:/var/lib/mysql onlyoffice-community-server: container_name: onlyoffice-community-server - image: onlyoffice/communityserver:11.0.0.1458 + image: onlyoffice/communityserver:11.5.4.1582 depends_on: - onlyoffice-mysql-server - onlyoffice-document-server - onlyoffice-mail-server + - onlyoffice-elasticsearch environment: - ONLYOFFICE_CORE_MACHINEKEY=core_secret - CONTROL_PANEL_PORT_80_TCP=80 @@ -41,6 +42,8 @@ services: - MAIL_SERVER_DB_NAME=onlyoffice_mailserver - MAIL_SERVER_DB_USER=onlyoffice_mailserver_user - MAIL_SERVER_DB_PASS=onlyoffice_mailserver_user_pass + - ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch + - ELASTICSEARCH_SERVER_HTTPPORT=9200 networks: - onlyoffice ports: @@ -58,9 +61,33 @@ services: - document_data:/var/www/onlyoffice/DocumentServerData - /sys/fs/cgroup:/sys/fs/cgroup:ro - ./certs:/var/www/onlyoffice/Data/certs + onlyoffice-elasticsearch: + image: onlyoffice/elasticsearch:7.9.0 + container_name: onlyoffice-elasticsearch + restart: always + environment: + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true" + - "indices.fielddata.cache.size=30%" + - "indices.memory.index_buffer_size=30%" + networks: + - onlyoffice + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65535 + hard: 65535 + volumes: + - es_data:/usr/share/elasticsearch/data + expose: + - "9200" + - "9300" onlyoffice-document-server: container_name: onlyoffice-document-server - image: onlyoffice/documentserver:6.0.2 + image: onlyoffice/documentserver:6.4.2.6 stdin_open: true tty: true restart: always @@ -110,7 +137,7 @@ services: - onlyoffice-document-server - onlyoffice-mail-server - onlyoffice-community-server - image: onlyoffice/controlpanel:2.9.0.351 + image: onlyoffice/controlpanel:3.0.2.395 environment: - ONLYOFFICE_CORE_MACHINEKEY=core_secret expose: @@ -143,3 +170,4 @@ volumes: controlpanel_data: controlpanel_log: mysql_data: + es_data: diff --git a/docker-compose.workspace_enterprise.yml b/docker-compose.workspace_enterprise.yml index f875c74..7c8e0d7 100644 --- a/docker-compose.workspace_enterprise.yml +++ b/docker-compose.workspace_enterprise.yml @@ -16,11 +16,12 @@ services: - mysql_data:/var/lib/mysql onlyoffice-community-server: container_name: onlyoffice-community-server - image: onlyoffice/communityserver:11.0.0.1458 + image: onlyoffice/communityserver:11.5.4.1582 depends_on: - onlyoffice-mysql-server - onlyoffice-document-server - onlyoffice-mail-server + - onlyoffice-elasticsearch environment: - ONLYOFFICE_CORE_MACHINEKEY=core_secret - CONTROL_PANEL_PORT_80_TCP=80 @@ -41,6 +42,8 @@ services: - MAIL_SERVER_DB_NAME=onlyoffice_mailserver - MAIL_SERVER_DB_USER=onlyoffice_mailserver_user - MAIL_SERVER_DB_PASS=onlyoffice_mailserver_user_pass + - ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch + - ELASTICSEARCH_SERVER_HTTPPORT=9200 networks: - onlyoffice ports: @@ -58,9 +61,33 @@ services: - document_data:/var/www/onlyoffice/DocumentServerData - /sys/fs/cgroup:/sys/fs/cgroup:ro - ./certs:/var/www/onlyoffice/Data/certs + onlyoffice-elasticsearch: + image: onlyoffice/elasticsearch:7.9.0 + container_name: onlyoffice-elasticsearch + restart: always + environment: + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true" + - "indices.fielddata.cache.size=30%" + - "indices.memory.index_buffer_size=30%" + networks: + - onlyoffice + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65535 + hard: 65535 + volumes: + - es_data:/usr/share/elasticsearch/data + expose: + - "9200" + - "9300" onlyoffice-document-server: container_name: onlyoffice-document-server - image: onlyoffice/documentserver-ee:6.0.2 + image: onlyoffice/documentserver-ee:6.4.2.6 stdin_open: true tty: true restart: always @@ -110,7 +137,7 @@ services: - onlyoffice-document-server - onlyoffice-mail-server - onlyoffice-community-server - image: onlyoffice/controlpanel:2.9.0.351 + image: onlyoffice/controlpanel:3.0.2.395 environment: - ONLYOFFICE_CORE_MACHINEKEY=core_secret expose: @@ -143,3 +170,4 @@ volumes: controlpanel_data: controlpanel_log: mysql_data: + es_data: From 035a7ed28c5c6ba39604ae4e1e94c7442b37c78d Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 8 Feb 2022 16:00:59 +0300 Subject: [PATCH 04/16] Fix log4j vulnerability in ami --- Dockerfile | 20 ++++++++++++++++++++ Dockerfile.ami | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 44b2fc0..e3d44b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,15 @@ ARG SOURCE_REPO_URL="deb http://static.teamlab.com.s3.amazonaws.com/repo/debian ARG DEBIAN_FRONTEND=noninteractive ARG PACKAGE_SYSNAME="onlyoffice" +ARG LOG4J_VER=2.17.1 +ARG LOG4J_BIN=apache-log4j-${LOG4J_VER}-bin +ARG LOG4J_ARCH=${LOG4J_BIN}.tar.gz +ARG LOG4J_DIR=./log4j + +ARG ELK_DIR=/usr/share/elasticsearch +ARG ELK_LIB_DIR=${ELK_DIR}/lib +ARG ELK_MODULE_DIR=${ELK_DIR}/modules + LABEL ${PACKAGE_SYSNAME}.community.release-date="${RELEASE_DATE}" \ ${PACKAGE_SYSNAME}.community.version="${VERSION}" \ description="Community Server is a free open-source collaborative system developed to manage documents, projects, customer relationship and emails, all in one place." \ @@ -84,6 +93,17 @@ RUN apt-get -y update && \ mono-webserver-hyperfastcgi=0.4-7 \ ${PACKAGE_SYSNAME}-communityserver \ ${PACKAGE_SYSNAME}-xmppserver && \ + rm -v ${ELK_LIB_DIR}/log4j-*.jar ${ELK_MODULE_DIR}/*/log4j-*.jar && \ + wget https://dlcdn.apache.org/logging/log4j/${LOG4J_VER}/${LOG4J_ARCH}&& \ + mkdir ${LOG4J_DIR} && \ + tar -xf ${LOG4J_ARCH} -C ${LOG4J_DIR} && \ + cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-api-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \ + cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-core-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \ + cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-1.2-api-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-core && \ + cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-identity-provider && \ + cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-security && \ + rm -vr ${LOG4J_ARCH} ${LOG4J_DIR} && \ + zip -q -d ${ELK_LIB_DIR}/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/Dockerfile.ami b/Dockerfile.ami index bddbd26..65e5aa9 100644 --- a/Dockerfile.ami +++ b/Dockerfile.ami @@ -2,26 +2,6 @@ FROM onlyoffice/communityserver:latest AS communityserver-ami ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config ARG RESOURCE_SQL=/var/www/onlyoffice/Sql/onlyoffice.resources.sql -ARG LOG4J_VER=2.17.1 -ARG LOG4J_BIN=apache-log4j-${LOG4J_VER}-bin -ARG LOG4J_ARCH=${LOG4J_BIN}.tar.gz -ARG LOG4J_DIR=./log4j - -ARG ELK_DIR=/usr/share/elasticsearch -ARG ELK_LIB_DIR=${ELK_DIR}/lib -ARG ELK_MODULE_DIR=${ELK_DIR}/modules - -RUN rm -v ${ELK_LIB_DIR}/log4j-*.jar ${ELK_MODULE_DIR}/*/log4j-*.jar && \ - wget https://dlcdn.apache.org/logging/log4j/${LOG4J_VER}/${LOG4J_ARCH}&& \ - mkdir ${LOG4J_DIR} && \ - tar -xf ${LOG4J_ARCH} -C ${LOG4J_DIR} && \ - cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-api-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \ - cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-core-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \ - cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-1.2-api-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-core && \ - cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-identity-provider && \ - cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-security && \ - rm -vr ${LOG4J_ARCH} ${LOG4J_DIR} - RUN apt-get -y update && \ apt-get install -yq xmlstarlet From 781aeb66ee1914934a97c3cdad98d6adaf8c73a5 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Sat, 5 Mar 2022 11:02:00 +0300 Subject: [PATCH 05/16] Update the log4j version (#140) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e3d44b5..416d3a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG SOURCE_REPO_URL="deb http://static.teamlab.com.s3.amazonaws.com/repo/debian ARG DEBIAN_FRONTEND=noninteractive ARG PACKAGE_SYSNAME="onlyoffice" -ARG LOG4J_VER=2.17.1 +ARG LOG4J_VER=2.17.2 ARG LOG4J_BIN=apache-log4j-${LOG4J_VER}-bin ARG LOG4J_ARCH=${LOG4J_BIN}.tar.gz ARG LOG4J_DIR=./log4j From 7305308346868a9ec7918bc12fd5fb079590f58d Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Fri, 11 Mar 2022 16:34:06 +0300 Subject: [PATCH 06/16] Bugfix/Add a dependency on dotnet (#141) * Add a dependency on dotnet * Fix adding a repository dotnet --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 416d3a1..2b8e370 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,8 @@ RUN apt-get -y update && \ echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.list && \ add-apt-repository -y ppa:certbot/certbot && \ add-apt-repository -y ppa:chris-lea/redis-server && \ + curl -sSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ + echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main" >> /etc/apt/sources.list.d/microsoft-prod.list && \ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - && \ apt-get install -yq gnupg2 \ ca-certificates \ @@ -91,6 +93,7 @@ RUN apt-get -y update && \ apt-transport-https \ elasticsearch=7.9.0 \ mono-webserver-hyperfastcgi=0.4-7 \ + dotnet-sdk-6.0 \ ${PACKAGE_SYSNAME}-communityserver \ ${PACKAGE_SYSNAME}-xmppserver && \ rm -v ${ELK_LIB_DIR}/log4j-*.jar ${ELK_MODULE_DIR}/*/log4j-*.jar && \ From 67fa15eacffec2cc48fb95f6faa3e4f8e119acf3 Mon Sep 17 00:00:00 2001 From: Mike Grunin Date: Mon, 14 Mar 2022 11:00:33 +0300 Subject: [PATCH 07/16] Update Readme.md / Changes for cgroup v2 (#139) * Update Readme.md / Changes for cgroup v2 * Add a correction for cgroups variable Co-authored-by: evgeniy-antonyuk --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5d88518..3d79beb 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mys Use this command to install **ONLYOFFICE Community Server**: ``` -sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \ +sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \ -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \ -e MYSQL_SERVER_DB_NAME=onlyoffice \ -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \ @@ -171,7 +171,7 @@ sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name o -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \ - -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ + -v /sys/fs/cgroup:/sys/fs/cgroup:rw \ onlyoffice/communityserver ``` @@ -186,11 +186,11 @@ All the data are stored in the specially-designated directories, **data volumes* To get access to your data from outside the container, you need to mount the volumes. It can be done by specifying the '-v' option in the docker run command. - sudo docker run -i -t -d -p 80:80 \ + sudo docker run -i -t -d -p 80:80 --cgroupns=host \ -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \ - -v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver + -v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver Storing the data on the host machine allows you to easily update ONLYOFFICE once the new version is released without losing your data. @@ -198,11 +198,11 @@ Storing the data on the host machine allows you to easily update ONLYOFFICE once To change the port, use the -p command. E.g.: to make your portal accessible via port 8080 execute the following command: - sudo docker run -i -t -d --privileged -p 8080:80 \ + sudo docker run -i -t -d --privileged -p 8080:80 --cgroupns=host \ -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \ - -v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver + -v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver ### Exposing Additional Ports @@ -214,11 +214,11 @@ The container ports to be exposed for **incoming connections** are the folloing: You can expose ports by specifying the '-p' option in the docker run command. - sudo docker run -i -t -d --privileged -p 80:80 -p 443:443 -p 5222:5222 \ + sudo docker run -i -t -d --privileged -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \ -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \ - -v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver + -v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver For **outgoing connections** you need to expose the following ports: @@ -397,7 +397,7 @@ docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-control- **STEP 6**: Install ONLYOFFICE Community Server ```bash -sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \ +sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \ -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \ -e MYSQL_SERVER_DB_NAME=onlyoffice \ -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \ @@ -415,7 +415,7 @@ sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name o -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \ - -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ + -v /sys/fs/cgroup:/sys/fs/cgroup:rw \ onlyoffice/communityserver ``` Where `${MAIL_SERVER_IP}` is the IP address for **ONLYOFFICE Mail Server**. You can easily get it using the command: @@ -480,7 +480,7 @@ where **STEP 4** Run the new image with the same map paths - sudo docker run -i -t -d --privileged -p 80:80 \ + sudo docker run -i -t -d --privileged -p 80:80 --cgroupns=host \ -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \ -e MYSQL_SERVER_DB_NAME=onlyoffice \ -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \ @@ -489,7 +489,7 @@ where -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \ - -v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver + -v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver *This will update **Community Server** container only and will not connect **Document Server** and **Mail Server** to it. You will need to use the additional parameters (like those used during installation) to connect them.* From 786b8d26142bf7c8f0c8b8019ff5d1361cacca24 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Tue, 15 Mar 2022 10:41:58 +0300 Subject: [PATCH 08/16] Fix configuration of mail services (#142) --- run-community-server.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/run-community-server.sh b/run-community-server.sh index 3477aad..99c1b94 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -13,6 +13,7 @@ APP_DATA_DIR="${APP_DIR}/Data" APP_INDEX_DIR="${APP_DATA_DIR}/Index/v7.9.0" APP_PRIVATE_DATA_DIR="${APP_DATA_DIR}/.private" APP_SERVICES_DIR="${APP_DIR}/Services" +APP_CONFIG_DIR="/etc/onlyoffice/communityserver" APP_SQL_DIR="${APP_DIR}/Sql" APP_ROOT_DIR="${APP_DIR}/WebStudio" APP_APISYSTEM_DIR="/var/www/onlyoffice/ApiSystem" @@ -482,8 +483,6 @@ else sed -i 's/
/
/' ${APP_ROOT_DIR}/Web.config sed -i '/
/a
' ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config sed -i 's/
/
/' ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config - sed -i '/
/a
' ${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config - sed -i 's/
/
/' ${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config if [ ${ELASTICSEARCH_SERVER_HTTPPORT} ]; then sed -i '/<\/configSections>/a ' ${APP_ROOT_DIR}/Web.config @@ -492,8 +491,8 @@ else sed -i '/<\/configSections>/a ' ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config sed -i 's// /' ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config - sed -i '/' ${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config - sed -i 's// /' ${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config + sed -i "s/\"Host\": \"127.0.0.1\"/\"Host\": \"${ELASTICSEARCH_SERVER_HOST}\"/g" ${APP_CONFIG_DIR}/elastic.development.json + sed -i "s/\"Port\": \"9200\"/\"Port\": \"${ELASTICSEARCH_SERVER_HTTPPORT}\"/g" ${APP_CONFIG_DIR}/elastic.development.json fi fi fi @@ -631,10 +630,6 @@ change_connections "default" "${APP_ROOT_DIR}/web.connections.config"; change_connections "teamlabsite" "${APP_ROOT_DIR}/web.connections.config"; change_connections "default" "${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config"; change_connections "default" "${APP_SERVICES_DIR}/Jabber/ASC.Xmpp.Server.Launcher.exe.config"; -change_connections "default" "${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config"; -change_connections "default" "${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.EmlDownloader.exe.config"; -change_connections "default" "${APP_SERVICES_DIR}/MailWatchdog/ASC.Mail.Watchdog.Service.exe.config"; -change_connections "default" "${APP_SERVICES_DIR}/MailCleaner/ASC.Mail.StorageCleaner.exe.config"; change_connections "default" "${APP_APISYSTEM_DIR}/Web.config"; sed "s!\"host\":.*,!\"host\":\"${MYSQL_SERVER_HOST}\",!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json @@ -642,6 +637,8 @@ sed "s!\"user\":.*,!\"user\":\"${MYSQL_SERVER_USER}\",!" -i ${APP_SERVICES_DIR}/ sed "s!\"password\":.*,!\"password\":\"${MYSQL_SERVER_PASS}\",!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json sed "s!\"database\":.*!\"database\":\"${MYSQL_SERVER_DB_NAME}\"!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json +sed -i "s/Server=.*/Server=${MYSQL_SERVER_HOST};Port=${MYSQL_SERVER_PORT};Database=${MYSQL_SERVER_DB_NAME};User ID=${MYSQL_SERVER_USER};Password=${MYSQL_SERVER_PASS};Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\",/g" ${APP_CONFIG_DIR}/appsettings.json + if [ "${DB_TABLES_COUNT}" -eq "0" ]; then mysql_batch_exec ${APP_SQL_DIR}/onlyoffice.sql mysql_batch_exec ${APP_SQL_DIR}/onlyoffice.data.sql @@ -704,7 +701,7 @@ if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then sed '/certificatePassword/s/\(value\s*=\s*\"\).*\"/\1'${SSL_CERTIFICATE_PATH_PFX_PWD}'\"/' -i ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config sed '/startTls/s/\(value\s*=\s*\"\).*\"/\1optional\"/' -i ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config; - sed '/mail\.default-api-scheme/s/\(value\s*=\s*\"\).*\"/\1https\"/' -i ${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config; + sed "s/\"DefaultApiSchema\": \"http\"/\"DefaultApiSchema\": \"https\"/g" -i ${APP_CONFIG_DIR}/mail.json else cp ${NGINX_ROOT_DIR}/includes/onlyoffice-communityserver-common.conf.template ${SYSCONF_TEMPLATES_DIR}/nginx/prepare-onlyoffice; @@ -914,9 +911,7 @@ do sed "/core\.machinekey/s!\"core\.machinekey\".*!\"core\.machinekey\":\"${APP_CORE_MACHINEKEY}\",!" -i ${APP_SERVICES_DIR}/ASC.Socket.IO/config/config.json sed "s!machine_key\s*=.*!machine_key = ${APP_CORE_MACHINEKEY}!g" -i ${APP_SERVICES_DIR}/TeamLabSvc/radicale.config sed "s!\"core\.machinekey\":.*,!\"core\.machinekey\":\"${APP_CORE_MACHINEKEY}\",!g" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json - sed "/core.machinekey/s!value=\".*\"!value=\"${APP_CORE_MACHINEKEY}\"!g" -i ${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.EmlDownloader.exe.config - sed "/core.machinekey/s!value=\".*\"!value=\"${APP_CORE_MACHINEKEY}\"!g" -i ${APP_SERVICES_DIR}/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config - sed "/core.machinekey/s!value=\".*\"!value=\"${APP_CORE_MACHINEKEY}\"!g" -i ${APP_SERVICES_DIR}/MailCleaner/ASC.Mail.StorageCleaner.exe.config + sed "s!\"machinekey\":.*!\"machinekey\":\"${APP_CORE_MACHINEKEY}\",!" -i ${APP_CONFIG_DIR}/appsettings.json continue; fi @@ -1094,6 +1089,7 @@ systemctl stop onlyofficeJabber systemctl stop onlyofficeMailAggregator systemctl stop onlyofficeMailWatchdog systemctl stop onlyofficeMailCleaner +systemctl stop onlyofficeMailImap systemctl stop onlyofficeNotify systemctl stop onlyofficeBackup systemctl stop onlyofficeStorageMigrate @@ -1139,6 +1135,7 @@ if [ "${APP_SERVICES_EXTERNAL}" == "true" ]; then systemctl disable onlyofficeMailAggregator.service systemctl disable onlyofficeMailWatchdog.service systemctl disable onlyofficeMailCleaner.service + systemctl disable onlyofficeMailImap.service systemctl disable onlyofficeNotify.service systemctl disable onlyofficeBackup.service systemctl disable onlyofficeStorageMigrate.service @@ -1156,6 +1153,7 @@ if [ "${APP_SERVICES_EXTERNAL}" == "true" ]; then rm -f /lib/systemd/system/onlyofficeMailAggregator.service rm -f /lib/systemd/system/onlyofficeMailWatchdog.service rm -f /lib/systemd/system/onlyofficeMailCleaner.service + rm -f /lib/systemd/system/onlyofficeMailImap.service rm -f /lib/systemd/system/onlyofficeNotify.service rm -f /lib/systemd/system/onlyofficeBackup.service rm -f /lib/systemd/system/onlyofficeStorageMigrate.sevice @@ -1175,6 +1173,7 @@ else systemctl enable onlyofficeMailAggregator.service systemctl enable onlyofficeMailWatchdog.service systemctl enable onlyofficeMailCleaner.service + systemctl enable onlyofficeMailImap.service systemctl enable onlyofficeNotify.service systemctl enable onlyofficeBackup.service systemctl enable onlyofficeStorageMigrate.service From 39ed0cd26b5f4d5aeb1e98e83a8b1da9023f50d2 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Wed, 16 Mar 2022 13:19:46 +0300 Subject: [PATCH 09/16] Add configuration for AutoCleanUp service (#143) --- run-community-server.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run-community-server.sh b/run-community-server.sh index 99c1b94..110bcf8 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -1096,6 +1096,7 @@ systemctl stop onlyofficeStorageMigrate systemctl stop onlyofficeStorageEncryption systemctl stop onlyofficeUrlShortener systemctl stop onlyofficeThumbnailBuilder +systemctl stop onlyofficeAutoCleanUp systemctl stop god systemctl enable god @@ -1142,6 +1143,7 @@ if [ "${APP_SERVICES_EXTERNAL}" == "true" ]; then systemctl disable onlyofficeStorageEncryption.service systemctl disable onlyofficeUrlShortener.service systemctl disable onlyofficeThumbnailBuilder.service + systemctl disable onlyofficeAutoCleanUp.service rm -f /lib/systemd/system/onlyofficeRadicale.service rm -f /lib/systemd/system/onlyofficeTelegram.service @@ -1160,6 +1162,7 @@ if [ "${APP_SERVICES_EXTERNAL}" == "true" ]; then rm -f /lib/systemd/system/onlyofficeStorageEncryption.sevice rm -f /lib/systemd/system/onlyofficeUrlShortener.service rm -f /lib/systemd/system/onlyofficeThumbnailBuilder.service + rm -f /lib/systemd/system/onlyofficeAutoCleanUp.service sed '/onlyoffice/d' -i ${APP_CRON_PATH} else @@ -1180,6 +1183,7 @@ else systemctl enable onlyofficeStorageEncryption.service systemctl enable onlyofficeUrlShortener.service systemctl enable onlyofficeThumbnailBuilder.service + systemctl enable onlyofficeAutoCleanUp.service fi if [ "${APP_MODE}" == "SERVER" ]; then From dae2b9c7ae80909168ff66c886d0ddee0a6ce6f1 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Wed, 23 Mar 2022 15:20:18 +0300 Subject: [PATCH 10/16] Upgrade elasticsearch to version 7.10.0 (#144) * Upgrade elasticsearch to version 7.10.0 * Upgrade elasticsearch to version 7.10.0 in docker-compose --- Dockerfile | 2 +- docker-compose.groups.yml | 2 +- docker-compose.workspace.yml | 2 +- docker-compose.workspace_enterprise.yml | 2 +- run-community-server.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2b8e370..d818968 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,7 +91,7 @@ RUN apt-get -y update && \ jq \ openjdk-8-jre-headless \ apt-transport-https \ - elasticsearch=7.9.0 \ + elasticsearch=7.10.0 \ mono-webserver-hyperfastcgi=0.4-7 \ dotnet-sdk-6.0 \ ${PACKAGE_SYSNAME}-communityserver \ diff --git a/docker-compose.groups.yml b/docker-compose.groups.yml index 60bb3dc..c9acde9 100644 --- a/docker-compose.groups.yml +++ b/docker-compose.groups.yml @@ -48,7 +48,7 @@ services: - /sys/fs/cgroup:/sys/fs/cgroup:ro - ./certs:/var/www/onlyoffice/Data/certs onlyoffice-elasticsearch: - image: onlyoffice/elasticsearch:7.9.0 + image: onlyoffice/elasticsearch:7.10.0 container_name: onlyoffice-elasticsearch restart: always environment: diff --git a/docker-compose.workspace.yml b/docker-compose.workspace.yml index 06a734b..d7a0125 100644 --- a/docker-compose.workspace.yml +++ b/docker-compose.workspace.yml @@ -62,7 +62,7 @@ services: - /sys/fs/cgroup:/sys/fs/cgroup:ro - ./certs:/var/www/onlyoffice/Data/certs onlyoffice-elasticsearch: - image: onlyoffice/elasticsearch:7.9.0 + image: onlyoffice/elasticsearch:7.10.0 container_name: onlyoffice-elasticsearch restart: always environment: diff --git a/docker-compose.workspace_enterprise.yml b/docker-compose.workspace_enterprise.yml index 7c8e0d7..20bac08 100644 --- a/docker-compose.workspace_enterprise.yml +++ b/docker-compose.workspace_enterprise.yml @@ -62,7 +62,7 @@ services: - /sys/fs/cgroup:/sys/fs/cgroup:ro - ./certs:/var/www/onlyoffice/Data/certs onlyoffice-elasticsearch: - image: onlyoffice/elasticsearch:7.9.0 + image: onlyoffice/elasticsearch:7.10.0 container_name: onlyoffice-elasticsearch restart: always environment: diff --git a/run-community-server.sh b/run-community-server.sh index 110bcf8..7415b90 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -10,7 +10,7 @@ echo "##########################################################" SERVER_HOST=${SERVER_HOST:-""}; APP_DIR="/var/www/onlyoffice" APP_DATA_DIR="${APP_DIR}/Data" -APP_INDEX_DIR="${APP_DATA_DIR}/Index/v7.9.0" +APP_INDEX_DIR="${APP_DATA_DIR}/Index/v7.10.0" APP_PRIVATE_DATA_DIR="${APP_DATA_DIR}/.private" APP_SERVICES_DIR="${APP_DIR}/Services" APP_CONFIG_DIR="/etc/onlyoffice/communityserver" From e37b318d07f8f214f827f48855d1826833d7d795 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Thu, 31 Mar 2022 15:15:51 +0300 Subject: [PATCH 11/16] Add environment variable elasticsearch version (#146) --- Dockerfile | 5 +++-- run-community-server.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d818968..fe9a422 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ LABEL ${PACKAGE_SYSNAME}.community.release-date="${RELEASE_DATE}" \ ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US:en \ - LC_ALL=en_US.UTF-8 + LC_ALL=en_US.UTF-8 \ + ELASTICSEARCH_VERSION=7.10.0 RUN apt-get -y update && \ apt-get -y upgrade && \ @@ -91,7 +92,7 @@ RUN apt-get -y update && \ jq \ openjdk-8-jre-headless \ apt-transport-https \ - elasticsearch=7.10.0 \ + elasticsearch=${ELASTICSEARCH_VERSION} \ mono-webserver-hyperfastcgi=0.4-7 \ dotnet-sdk-6.0 \ ${PACKAGE_SYSNAME}-communityserver \ diff --git a/run-community-server.sh b/run-community-server.sh index 7415b90..1b7d1bb 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -10,7 +10,7 @@ echo "##########################################################" SERVER_HOST=${SERVER_HOST:-""}; APP_DIR="/var/www/onlyoffice" APP_DATA_DIR="${APP_DIR}/Data" -APP_INDEX_DIR="${APP_DATA_DIR}/Index/v7.10.0" +APP_INDEX_DIR="${APP_DATA_DIR}/Index/v${ELASTICSEARCH_VERSION}" APP_PRIVATE_DATA_DIR="${APP_DATA_DIR}/.private" APP_SERVICES_DIR="${APP_DIR}/Services" APP_CONFIG_DIR="/etc/onlyoffice/communityserver" From 05de0bd0856c4c99c98fe9766db3098b5d6aab4a Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Fri, 13 May 2022 16:37:05 +0300 Subject: [PATCH 12/16] Rename mail env to production --- run-community-server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-community-server.sh b/run-community-server.sh index 1b7d1bb..22750c7 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -491,8 +491,8 @@ else sed -i '/<\/configSections>/a ' ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config sed -i 's// /' ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config - sed -i "s/\"Host\": \"127.0.0.1\"/\"Host\": \"${ELASTICSEARCH_SERVER_HOST}\"/g" ${APP_CONFIG_DIR}/elastic.development.json - sed -i "s/\"Port\": \"9200\"/\"Port\": \"${ELASTICSEARCH_SERVER_HTTPPORT}\"/g" ${APP_CONFIG_DIR}/elastic.development.json + sed -i "s/\"Host\": \"127.0.0.1\"/\"Host\": \"${ELASTICSEARCH_SERVER_HOST}\"/g" ${APP_CONFIG_DIR}/elastic.production.json + sed -i "s/\"Port\": \"9200\"/\"Port\": \"${ELASTICSEARCH_SERVER_HTTPPORT}\"/g" ${APP_CONFIG_DIR}/elastic.production.json fi fi fi From 623468f2e0ec7de45a46b4b86d68446b773b7043 Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Mon, 16 May 2022 11:51:07 +0300 Subject: [PATCH 13/16] Change mail enviroment to production --- run-community-server.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run-community-server.sh b/run-community-server.sh index 22750c7..8d213a8 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -637,7 +637,7 @@ sed "s!\"user\":.*,!\"user\":\"${MYSQL_SERVER_USER}\",!" -i ${APP_SERVICES_DIR}/ sed "s!\"password\":.*,!\"password\":\"${MYSQL_SERVER_PASS}\",!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json sed "s!\"database\":.*!\"database\":\"${MYSQL_SERVER_DB_NAME}\"!" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json -sed -i "s/Server=.*/Server=${MYSQL_SERVER_HOST};Port=${MYSQL_SERVER_PORT};Database=${MYSQL_SERVER_DB_NAME};User ID=${MYSQL_SERVER_USER};Password=${MYSQL_SERVER_PASS};Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\",/g" ${APP_CONFIG_DIR}/appsettings.json +sed -i "s/Server=.*/Server=${MYSQL_SERVER_HOST};Port=${MYSQL_SERVER_PORT};Database=${MYSQL_SERVER_DB_NAME};User ID=${MYSQL_SERVER_USER};Password=${MYSQL_SERVER_PASS};Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\",/g" ${APP_CONFIG_DIR}/appsettings.production.json if [ "${DB_TABLES_COUNT}" -eq "0" ]; then mysql_batch_exec ${APP_SQL_DIR}/onlyoffice.sql @@ -701,7 +701,7 @@ if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then sed '/certificatePassword/s/\(value\s*=\s*\"\).*\"/\1'${SSL_CERTIFICATE_PATH_PFX_PWD}'\"/' -i ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config sed '/startTls/s/\(value\s*=\s*\"\).*\"/\1optional\"/' -i ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config; - sed "s/\"DefaultApiSchema\": \"http\"/\"DefaultApiSchema\": \"https\"/g" -i ${APP_CONFIG_DIR}/mail.json + sed "s/\"DefaultApiSchema\": \"http\"/\"DefaultApiSchema\": \"https\"/g" -i ${APP_CONFIG_DIR}/mail.production.json else cp ${NGINX_ROOT_DIR}/includes/onlyoffice-communityserver-common.conf.template ${SYSCONF_TEMPLATES_DIR}/nginx/prepare-onlyoffice; @@ -911,7 +911,7 @@ do sed "/core\.machinekey/s!\"core\.machinekey\".*!\"core\.machinekey\":\"${APP_CORE_MACHINEKEY}\",!" -i ${APP_SERVICES_DIR}/ASC.Socket.IO/config/config.json sed "s!machine_key\s*=.*!machine_key = ${APP_CORE_MACHINEKEY}!g" -i ${APP_SERVICES_DIR}/TeamLabSvc/radicale.config sed "s!\"core\.machinekey\":.*,!\"core\.machinekey\":\"${APP_CORE_MACHINEKEY}\",!g" -i ${APP_SERVICES_DIR}/ASC.UrlShortener/config/config.json - sed "s!\"machinekey\":.*!\"machinekey\":\"${APP_CORE_MACHINEKEY}\",!" -i ${APP_CONFIG_DIR}/appsettings.json + sed "s!\"machinekey\":.*!\"machinekey\":\"${APP_CORE_MACHINEKEY}\",!" -i ${APP_CONFIG_DIR}/appsettings.production.json continue; fi From a6b2d64c2ec36ef0ffb05db4aedf8ce138a0f453 Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Mon, 16 May 2022 18:39:54 +0300 Subject: [PATCH 14/16] Remove an unused dependency from installation --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fe9a422..facff20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,7 +90,6 @@ RUN apt-get -y update && \ iproute2 \ ffmpeg \ jq \ - openjdk-8-jre-headless \ apt-transport-https \ elasticsearch=${ELASTICSEARCH_VERSION} \ mono-webserver-hyperfastcgi=0.4-7 \ From 10e2233791c6d098a916b143ac89fb5094631d36 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Thu, 19 May 2022 17:26:38 +0300 Subject: [PATCH 15/16] fix Bug 56967/Add ImapSyncStartDate value substitution (#152) * Add ImapSyncStartDate value substitution * Add MAIL_IMAPSYNC_START_DATE variable * Change the ImapSyncStartDate date --- run-community-server.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run-community-server.sh b/run-community-server.sh index 8d213a8..84f2b72 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -431,6 +431,9 @@ if [ ${MAIL_SERVER_DB_HOST} ]; then fi fi +MAIL_IMAPSYNC_START_DATE=${MAIL_IMAPSYNC_START_DATE:-$(date +"%Y-%m-%dT%H:%M:%S")}; +sed 's_\(\"ImapSyncStartDate":\).*,_\1 "'${MAIL_IMAPSYNC_START_DATE//T*/}'",_' -i ${APP_CONFIG_DIR}/mail.production.json +sed "/mail\.imap-sync-start-date/s/value=\"\S*\"/value=\"${MAIL_IMAPSYNC_START_DATE}\"/g" -i ${APP_ROOT_DIR}/web.appsettings.config if [ ${MAIL_SERVER_API_HOST} ]; then if [ ! bash ${SYSCONF_TOOLS_DIR}/wait-for-it.sh ${MAIL_SERVER_API_HOST}:25 --timeout=300 --quiet -s -- echo "MailServer is up" ]; then From 7975f48af76e248cf616d29ed42dee6cfa6a6d31 Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Mon, 23 May 2022 12:27:39 +0300 Subject: [PATCH 16/16] Change format of Mail_Imapsync_Start_Date in mail.production.json --- run-community-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-community-server.sh b/run-community-server.sh index 84f2b72..f020c1f 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -432,7 +432,7 @@ if [ ${MAIL_SERVER_DB_HOST} ]; then fi MAIL_IMAPSYNC_START_DATE=${MAIL_IMAPSYNC_START_DATE:-$(date +"%Y-%m-%dT%H:%M:%S")}; -sed 's_\(\"ImapSyncStartDate":\).*,_\1 "'${MAIL_IMAPSYNC_START_DATE//T*/}'",_' -i ${APP_CONFIG_DIR}/mail.production.json +sed 's_\(\"ImapSyncStartDate":\).*,_\1 "'${MAIL_IMAPSYNC_START_DATE}'",_' -i ${APP_CONFIG_DIR}/mail.production.json sed "/mail\.imap-sync-start-date/s/value=\"\S*\"/value=\"${MAIL_IMAPSYNC_START_DATE}\"/g" -i ${APP_ROOT_DIR}/web.appsettings.config if [ ${MAIL_SERVER_API_HOST} ]; then