From 6c0c7085c91f76d4cc2e36d05741870d86da5d55 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Mon, 31 Oct 2022 17:19:10 +0300 Subject: [PATCH 1/7] Feature/Add supervisor services (#517) * Add supervisor services * Add installation of the DOCKER_INSTALLATION variable --- Dockerfile | 1 + config/supervisor/ds/ds-converter.conf | 13 +++++++++++++ config/supervisor/ds/ds-docservice.conf | 13 +++++++++++++ config/supervisor/ds/ds-example.conf | 14 ++++++++++++++ config/supervisor/ds/ds-metrics.conf | 13 +++++++++++++ config/supervisor/ds/ds.conf | 2 ++ run-document-server.sh | 2 ++ 7 files changed, 58 insertions(+) create mode 100644 config/supervisor/ds/ds-converter.conf create mode 100644 config/supervisor/ds/ds-docservice.conf create mode 100644 config/supervisor/ds/ds-example.conf create mode 100644 config/supervisor/ds/ds-metrics.conf create mode 100644 config/supervisor/ds/ds.conf diff --git a/Dockerfile b/Dockerfile index 7aa158a..8788f78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,6 +86,7 @@ RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VER wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE" && \ apt-get -y update && \ service postgresql start && \ + export DOCKER_INSTALLATION=1 && \ apt-get -yq install /tmp/$PACKAGE_FILE && \ service postgresql stop && \ service supervisor stop && \ diff --git a/config/supervisor/ds/ds-converter.conf b/config/supervisor/ds/ds-converter.conf new file mode 100644 index 0000000..69285cd --- /dev/null +++ b/config/supervisor/ds/ds-converter.conf @@ -0,0 +1,13 @@ +[program:converter] +command=/var/www/COMPANY_NAME/documentserver/server/FileConverter/converter +directory=/var/www/COMPANY_NAME/documentserver/server/FileConverter +user=ds +environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=COMPANY_NAME +stdout_logfile=/var/log/COMPANY_NAME/documentserver/converter/out.log +stdout_logfile_backups=0 +stdout_logfile_maxbytes=0 +stderr_logfile=/var/log/COMPANY_NAME/documentserver/converter/err.log +stderr_logfile_backups=0 +stderr_logfile_maxbytes=0 +autostart=true +autorestart=true diff --git a/config/supervisor/ds/ds-docservice.conf b/config/supervisor/ds/ds-docservice.conf new file mode 100644 index 0000000..4afbc1b --- /dev/null +++ b/config/supervisor/ds/ds-docservice.conf @@ -0,0 +1,13 @@ +[program:docservice] +command=/var/www/COMPANY_NAME/documentserver/server/DocService/docservice +directory=/var/www/COMPANY_NAME/documentserver/server/DocService +user=ds +environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1 +stdout_logfile=/var/log/COMPANY_NAME/documentserver/docservice/out.log +stdout_logfile_backups=0 +stdout_logfile_maxbytes=0 +stderr_logfile=/var/log/COMPANY_NAME/documentserver/docservice/err.log +stderr_logfile_backups=0 +stderr_logfile_maxbytes=0 +autostart=true +autorestart=true diff --git a/config/supervisor/ds/ds-example.conf b/config/supervisor/ds/ds-example.conf new file mode 100644 index 0000000..44fa688 --- /dev/null +++ b/config/supervisor/ds/ds-example.conf @@ -0,0 +1,14 @@ +[program:example] +command=/var/www/COMPANY_NAME/documentserver-example/example +directory=/var/www/COMPANY_NAME/documentserver-example/ +user=ds +environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver-example,NODE_DISABLE_COLORS=1 +stdout_logfile=/var/log/COMPANY_NAME/documentserver-example/out.log +stdout_logfile_backups=0 +stdout_logfile_maxbytes=0 +stderr_logfile=/var/log/COMPANY_NAME/documentserver-example/err.log +stderr_logfile_backups=0 +stderr_logfile_maxbytes=0 +autostart=false +autorestart=true +redirect_stderr=true diff --git a/config/supervisor/ds/ds-metrics.conf b/config/supervisor/ds/ds-metrics.conf new file mode 100644 index 0000000..1eb858a --- /dev/null +++ b/config/supervisor/ds/ds-metrics.conf @@ -0,0 +1,13 @@ +[program:metrics] +command=/var/www/COMPANY_NAME/documentserver/server/Metrics/metrics ./config/config.js +directory=/var/www/COMPANY_NAME/documentserver/server/Metrics +user=ds +environment=NODE_DISABLE_COLORS=1 +stdout_logfile=/var/log/COMPANY_NAME/documentserver/metrics/out.log +stdout_logfile_backups=0 +stdout_logfile_maxbytes=0 +stderr_logfile=/var/log/COMPANY_NAME/documentserver/metrics/err.log +stderr_logfile_backups=0 +stderr_logfile_maxbytes=0 +autostart=true +autorestart=true diff --git a/config/supervisor/ds/ds.conf b/config/supervisor/ds/ds.conf new file mode 100644 index 0000000..c9179df --- /dev/null +++ b/config/supervisor/ds/ds.conf @@ -0,0 +1,2 @@ +[group:ds] +programs=docservice,converter,metrics,example diff --git a/run-document-server.sh b/run-document-server.sh index fd183a3..482be89 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -496,6 +496,8 @@ update_supervisor_settings(){ cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisor /etc/init.d/ # Copy modified supervisor config cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisord.conf /etc/supervisor/supervisord.conf + sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf + cp ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf etc/supervisor/conf.d/ } update_log_settings(){ From 452dd4996d77673c533488981f6f8fa9f7cb519a Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Mon, 31 Oct 2022 17:52:20 +0300 Subject: [PATCH 2/7] Correct the name of the docker installation variable (#536) --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8788f78..8470c59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,13 +80,13 @@ ARG PACKAGE_BASEURL="http://download.onlyoffice.com/install/documentserver/linux ENV COMPANY_NAME=$COMPANY_NAME \ PRODUCT_NAME=$PRODUCT_NAME \ - PRODUCT_EDITION=$PRODUCT_EDITION + PRODUCT_EDITION=$PRODUCT_EDITION \ + DS_DOCKER_INSTALLATION=true RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VERSION:+_$PACKAGE_VERSION}_${TARGETARCH:-$(dpkg --print-architecture)}.deb" && \ wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE" && \ apt-get -y update && \ service postgresql start && \ - export DOCKER_INSTALLATION=1 && \ apt-get -yq install /tmp/$PACKAGE_FILE && \ service postgresql stop && \ service supervisor stop && \ From 574b3c92b4d6517a8d4b33fbde0c1868765e7740 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Thu, 1 Dec 2022 14:46:31 +0300 Subject: [PATCH 3/7] Update build scripts (#550) --- .github/workflows/4testing-build.yml | 10 +++++----- Makefile | 19 ++++++++++--------- docker-bake.hcl | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/4testing-build.yml b/.github/workflows/4testing-build.yml index 4343507..683bb80 100644 --- a/.github/workflows/4testing-build.yml +++ b/.github/workflows/4testing-build.yml @@ -115,18 +115,18 @@ jobs: BRANCH_NAME=${GITHUB_REF#refs/heads/} if [ $BRANCH_NAME = develop ]; then - RELEASE_BRANCH=unstable + BUILD_CHANNEL=nightly PRODUCT_VERSION=99.99.99 elif [[ $BRANCH_NAME =~ hotfix || $BRANCH_NAME =~ release ]]; then - RELEASE_BRANCH=testing + BUILD_CHANNEL=test PRODUCT_VERSION=${BRANCH_NAME#*/v} fi BUILD_NUMBER=${{ github.event.inputs.build }} export PRODUCT_EDITION - export PACKAGE_VERSION=${PRODUCT_VERSION}-${BUILD_NUMBER} - export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}/${RELEASE_BRANCH}/ubuntu - export RELEASE_BRANCH + export PACKAGE_VERSION=${PRODUCT_VERSION}-${BUILD_NUMBER}~stretch + export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}/${BUILD_CHANNEL} + export BUILD_CHANNEL export PLATFORM export DOCKERFILE=Dockerfile export PREFIX_NAME=4testing- diff --git a/Makefile b/Makefile index e255521..5ef925e 100644 --- a/Makefile +++ b/Makefile @@ -4,28 +4,29 @@ PRODUCT_NAME ?= DocumentServer PRODUCT_EDITION ?= PRODUCT_VERSION ?= 0.0.0 BUILD_NUMBER ?= 0 +BUILD_CHANNEL ?= nightly ONLYOFFICE_VALUE ?= onlyoffice S3_BUCKET ?= repo-doc-onlyoffice-com -RELEASE_BRANCH ?= unstable +S3_REGION ?= eu-west-1 COMPANY_NAME_LOW = $(shell echo $(COMPANY_NAME) | tr A-Z a-z) PRODUCT_NAME_LOW = $(shell echo $(PRODUCT_NAME) | tr A-Z a-z) COMPANY_NAME_LOW_ESCAPED = $(subst -,,$(COMPANY_NAME_LOW)) PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION) -PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER) -PACKAGE_BASEURL := https://s3.eu-west-1.amazonaws.com/$(S3_BUCKET)/$(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/ubuntu +PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)~stretch +PACKAGE_BASEURL := https://s3.$(S3_REGION).amazonaws.com/$(S3_BUCKET)/server/linux/debian/$(BUILD_CHANNEL) -ifeq ($(RELEASE_BRANCH),$(filter $(RELEASE_BRANCH),unstable testing)) - DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION)) +ifeq ($(BUILD_CHANNEL),$(filter $(BUILD_CHANNEL),nightly test)) + DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER) else - DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION))-$(subst /,-,$(GIT_BRANCH)) + DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)-$(subst /,-,$(GIT_BRANCH)) endif DOCKER_IMAGE := $(subst -,,$(COMPANY_NAME_LOW))/4testing-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION) DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)__$(DOCKER_TAG).dummy -DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)_$(PACKAGE_VERSION).tar.gz -DOCKER_ARCH_URI := $(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/docker/$(notdir $(DOCKER_ARCH)) +DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)_$(DOCKER_TAG).tar.gz +DOCKER_ARCH_URI := server/linux/docker/$(BUILD_CHANNEL)/$(notdir $(DOCKER_ARCH)) .PHONY: all clean clean-docker image deploy docker publish @@ -61,7 +62,7 @@ deploy: $(DOCKER_DUMMY) for i in {1..3}; do \ docker push $(DOCKER_IMAGE):$(DOCKER_TAG) && break || sleep 1m; \ done -ifeq ($(RELEASE_BRANCH),unstable) +ifeq ($(BUILD_CHANNEL),nightly) docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest for i in {1..3}; do \ docker push $(DOCKER_IMAGE):latest && break || sleep 1m; \ diff --git a/docker-bake.hcl b/docker-bake.hcl index ee9175e..0e25c8b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -46,7 +46,7 @@ variable "PACKAGE_FILE" { default = "" } -variable "RELEASE_BRANCH" { +variable "BUILD_CHANNEL" { default = "" } @@ -55,7 +55,7 @@ target "documentserver" { dockerfile = "${DOCKERFILE}" tags = [ "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}", - equal("unstable",RELEASE_BRANCH) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "", + equal("nightly",BUILD_CHANNEL) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "", ] platforms = ["${PLATFORM}"] args = { From b0745353666d0f4e17254f302b47de5f76362b76 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Thu, 15 Dec 2022 17:45:33 +0300 Subject: [PATCH 4/7] Fix makefile (#554) --- Makefile | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 5ef925e..99b749b 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,18 @@ COMPANY_NAME ?= ONLYOFFICE GIT_BRANCH ?= develop -PRODUCT_NAME ?= DocumentServer +PRODUCT_NAME ?= documentserver PRODUCT_EDITION ?= PRODUCT_VERSION ?= 0.0.0 BUILD_NUMBER ?= 0 BUILD_CHANNEL ?= nightly ONLYOFFICE_VALUE ?= onlyoffice -S3_BUCKET ?= repo-doc-onlyoffice-com -S3_REGION ?= eu-west-1 COMPANY_NAME_LOW = $(shell echo $(COMPANY_NAME) | tr A-Z a-z) -PRODUCT_NAME_LOW = $(shell echo $(PRODUCT_NAME) | tr A-Z a-z) -COMPANY_NAME_LOW_ESCAPED = $(subst -,,$(COMPANY_NAME_LOW)) +COMPANY_NAME_ESC = $(subst -,,$(COMPANY_NAME_LOW)) -PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION) -PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)~stretch -PACKAGE_BASEURL := https://s3.$(S3_REGION).amazonaws.com/$(S3_BUCKET)/server/linux/debian/$(BUILD_CHANNEL) +PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)$(PRODUCT_EDITION) +PACKAGE_VERSION ?= $(PRODUCT_VERSION)-$(BUILD_NUMBER)~stretch +PACKAGE_BASEURL ?= https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/server/linux/debian/$(BUILD_CHANNEL) ifeq ($(BUILD_CHANNEL),$(filter $(BUILD_CHANNEL),nightly test)) DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER) @@ -23,18 +20,17 @@ else DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)-$(subst /,-,$(GIT_BRANCH)) endif -DOCKER_IMAGE := $(subst -,,$(COMPANY_NAME_LOW))/4testing-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION) -DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)__$(DOCKER_TAG).dummy -DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)_$(DOCKER_TAG).tar.gz -DOCKER_ARCH_URI := server/linux/docker/$(BUILD_CHANNEL)/$(notdir $(DOCKER_ARCH)) +DOCKER_IMAGE := $(COMPANY_NAME_ESC)/4testing-$(PRODUCT_NAME)$(PRODUCT_EDITION) +DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)$(PRODUCT_EDITION)__$(DOCKER_TAG).dummy +DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)_$(DOCKER_TAG).tar.gz -.PHONY: all clean clean-docker image deploy docker publish +.PHONY: all clean clean-docker image deploy docker $(DOCKER_DUMMY): - docker pull ubuntu:20.04 + docker pull ubuntu:22.04 docker build \ --build-arg COMPANY_NAME=$(COMPANY_NAME_LOW) \ - --build-arg PRODUCT_NAME=$(PRODUCT_NAME_LOW) \ + --build-arg PRODUCT_NAME=$(PRODUCT_NAME) \ --build-arg PRODUCT_EDITION=$(PRODUCT_EDITION) \ --build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) \ --build-arg PACKAGE_BASEURL=$(PACKAGE_BASEURL) \ @@ -68,7 +64,3 @@ ifeq ($(BUILD_CHANNEL),nightly) docker push $(DOCKER_IMAGE):latest && break || sleep 1m; \ done endif - -publish: $(DOCKER_ARCH) - aws s3 cp --no-progress --acl public-read \ - $(DOCKER_ARCH) s3://$(S3_BUCKET)/$(DOCKER_ARCH_URI) From 759bed5c14ed97a32a2790091bac6e918216c423 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Fri, 30 Dec 2022 12:40:54 +0300 Subject: [PATCH 5/7] Add obligatory use of JWT parameters (#562) --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c384e3..9e40e91 100644 --- a/README.md +++ b/README.md @@ -220,10 +220,20 @@ Then launch containers on it using the 'docker run --net onlyoffice' option: Follow [these steps](#installing-mysql) to install MySQL server. -**STEP 3**: Install ONLYOFFICE Document Server. +**STEP 3**: Generate JWT Secret + +JWT secret defines the secret key to validate the JSON Web Token in the request to the **ONLYOFFICE Document Server**. You can specify it yourself or easily get it using the command: +``` +JWT_SECRET=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12); +``` + +**STEP 4**: Install ONLYOFFICE Document Server. ```bash sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server \ + -e JWT_ENABLED=true \ + -e JWT_SECRET=${JWT_SECRET} \ + -e JWT_HEADER=AuthorizationJwt \ -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \ @@ -231,7 +241,7 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-doc onlyoffice/documentserver ``` -**STEP 4**: Install ONLYOFFICE Mail Server. +**STEP 5**: Install ONLYOFFICE Mail Server. For the mail server correct work you need to specify its hostname 'yourdomain.com'. @@ -253,7 +263,7 @@ The additional parameters for mail server are available [here](https://github.co To learn more, refer to the [ONLYOFFICE Mail Server documentation](https://github.com/ONLYOFFICE/Docker-MailServer "ONLYOFFICE Mail Server documentation"). -**STEP 5**: Install ONLYOFFICE Community Server +**STEP 6**: Install ONLYOFFICE Community Server ```bash sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \ @@ -264,6 +274,9 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-com -e MYSQL_SERVER_PASS=onlyoffice_pass \ -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \ + -e DOCUMENT_SERVER_JWT_ENABLED=true \ + -e DOCUMENT_SERVER_JWT_SECRET=${JWT_SECRET} \ + -e DOCUMENT_SERVER_JWT_HEADER=AuthorizationJwt \ -e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \ -e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \ From 26f3d34ac3cdb048623caac54d494b74aeb3ea79 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Fri, 30 Dec 2022 12:50:18 +0300 Subject: [PATCH 6/7] Cosmetic changes README.md (#563) --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9e40e91..9797860 100644 --- a/README.md +++ b/README.md @@ -231,14 +231,14 @@ JWT_SECRET=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12); ```bash sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server \ - -e JWT_ENABLED=true \ - -e JWT_SECRET=${JWT_SECRET} \ - -e JWT_HEADER=AuthorizationJwt \ - -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ - -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \ - -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \ - -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \ - onlyoffice/documentserver + -e JWT_ENABLED=true \ + -e JWT_SECRET=${JWT_SECRET} \ + -e JWT_HEADER=AuthorizationJwt \ + -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ + -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \ + -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \ + -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \ + onlyoffice/documentserver ``` **STEP 5**: Install ONLYOFFICE Mail Server. @@ -266,7 +266,7 @@ To learn more, refer to the [ONLYOFFICE Mail Server documentation](https://githu **STEP 6**: Install ONLYOFFICE Community Server ```bash -sudo docker run --net onlyoffice -i -t -d --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 \ @@ -287,12 +287,14 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-com -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:rw \ onlyoffice/communityserver ``` Where `${MAIL_SERVER_IP}` is the IP address for **ONLYOFFICE Mail Server**. You can easily get it using the command: ``` -docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server +MAIL_SERVER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server) ``` Alternatively, you can use an automatic installation script to install the whole ONLYOFFICE Community Edition at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'. From 611db1f4a9a8b13ce1f1c456b7cb06e2eac03795 Mon Sep 17 00:00:00 2001 From: Danil Titarenko <77471369+danilapog@users.noreply.github.com> Date: Wed, 18 Jan 2023 17:58:48 +0300 Subject: [PATCH 7/7] Fix docker build by downgrading rabbit from 3.10 to 3.9 (#569) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c4fb454..a0e2156 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ locale-gen en_US.UTF-8 && \ echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \ wget -O - https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | bash && \ - if [ $(lsb_release -cs) = focal ]; then RABBITMQ_VERSION=3.8.11-1; else RABBITMQ_VERSION=3.10 ; fi && \ + if [ $(lsb_release -cs) = focal ]; then RABBITMQ_VERSION=3.8.11-1; else RABBITMQ_VERSION=3.9 ; fi && \ apt-get -yq install \ adduser \ apt-utils \