From fcbbe2979fb49af0167698ec0c2d8522e69b960d Mon Sep 17 00:00:00 2001 From: Pavel Lobashov Date: Thu, 27 Oct 2022 11:08:52 +0300 Subject: [PATCH 1/6] Add note (#526) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5020dfd..4c384e3 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ Starting from version 6.0, Document Server is distributed as ONLYOFFICE Docs. It ONLYOFFICE Docs can be used as a part of ONLYOFFICE Workspace or with third-party sync&share solutions (e.g. Nextcloud, ownCloud, Seafile) to enable collaborative editing within their interface. +***Important*** Please update `docker-enginge` to latest version (`20.10.21` as of writing this doc) before using it. We use `ubuntu:22.04` as base image and it older versions of docker have compatibility problems with it + ## Functionality ## * ONLYOFFICE Document Editor * ONLYOFFICE Spreadsheet Editor From d98eb758b55ee990cf81978b6ef8b0b2b5a13f20 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Fri, 28 Oct 2022 16:33:41 +0300 Subject: [PATCH 2/6] Fix Bug 59483 - Fix port parsing from amqp_uri (#529) * Fix port parsing from amqp_uri * Correct regex for port parsing --- run-document-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-document-server.sh b/run-document-server.sh index fd183a3..f290e8d 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -199,7 +199,7 @@ parse_rabbitmq_url(){ # extract the host local hostport="$(echo ${url/$userpass@/} | cut -d/ -f1)" # by request - try to extract the port - local port="$(echo $hostport | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')" + local port="$(echo $hostport | grep : | sed -r 's_^.*:+|/.*$__g')" local host if [ -n "$port" ]; then From 92dd2833d1479ebe25afe3da85a78d308e6e06ff Mon Sep 17 00:00:00 2001 From: Danil Titarenko <77471369+danilapog@users.noreply.github.com> Date: Mon, 31 Oct 2022 11:53:24 +0300 Subject: [PATCH 3/6] Add ucs build on older image version (#531) --- .github/workflows/stable-build.yml | 36 ++++++++++++++++++++++++++++++ docker-bake.hcl | 30 +++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/.github/workflows/stable-build.yml b/.github/workflows/stable-build.yml index a15f551..d8278f2 100644 --- a/.github/workflows/stable-build.yml +++ b/.github/workflows/stable-build.yml @@ -92,3 +92,39 @@ jobs: export TAG=${{ github.event.inputs.tag }} docker buildx bake -f docker-bake.hcl ${{ matrix.images }} --push shell: bash + + build-ucs-ubuntu20: + name: "Release image: DocumentServer${{ matrix.edition }}-ucs" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + edition: ["", "-ee"] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: build UCS + run: | + set -eux + export PRODUCT_EDITION=${{ matrix.edition }} + export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}/testing/ubuntu + export DOCKERFILE=Dockerfile + export BASE_IMAGE=ubuntu:20.04 + export PG_VERSION=12 + export TAG=${{ github.event.inputs.tag }} + export PACKAGE_VERSION=$( echo ${TAG} | sed -E 's/(.*)\./\1-/') + docker buildx bake -f docker-bake.hcl documentserver-ucs --push + shell: bash diff --git a/docker-bake.hcl b/docker-bake.hcl index ee9175e..529a8fd 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -50,6 +50,18 @@ variable "RELEASE_BRANCH" { default = "" } +### ↓ Variables for UCS build ↓ + +variable "BASE_IMAGE" { + default = "" +} + +variable "PG_VERSION" { + default = "" +} + +### ↑ Variables for UCS build ↑ + target "documentserver" { target = "documentserver" dockerfile = "${DOCKERFILE}" @@ -85,6 +97,24 @@ target "documentserver-stable" { } } +target "documentserver-ucs" { + target = "documentserver" + dockerfile = "${DOCKERFILE}" + tags = [ + "docker.io/${COMPANY_NAME}/${PRODUCT_NAME}${PRODUCT_EDITION}-ucs:${TAG}" + ] + platforms = ["linux/amd64", "linux/arm64"] + args = { + "PRODUCT_EDITION": "${PRODUCT_EDITION}" + "PRODUCT_NAME": "${PRODUCT_NAME}" + "COMPANY_NAME": "${COMPANY_NAME}" + "PACKAGE_VERSION": "${PACKAGE_VERSION}" + "PACKAGE_BASEURL": "${PACKAGE_BASEURL}" + "BASE_IMAGE": "${BASE_IMAGE}" + "PG_VERSION": "${PG_VERSION}" + } +} + target "documentserver-nonexample" { target = "documentserver-nonexample" dockerfile = "production.dockerfile" From e1d7cfd5e86bf143d25b019fd72ec2849df15a03 Mon Sep 17 00:00:00 2001 From: Danil Titarenko <77471369+danilapog@users.noreply.github.com> Date: Mon, 31 Oct 2022 15:24:17 +0300 Subject: [PATCH 4/6] Add base image and postgresql version build arguments (#524) --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7aa158a..5ebd56d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,11 @@ -FROM ubuntu:22.04 as documentserver +ARG BASE_IMAGE=ubuntu:22.04 + +FROM ${BASE_IMAGE} as documentserver LABEL maintainer Ascensio System SIA -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=14 +ARG PG_VERSION=14 + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=${PG_VERSION} ARG ONLYOFFICE_VALUE=onlyoffice From cdc73fe379512f2f889759d88b230559c4065c21 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Mon, 31 Oct 2022 16:34:42 +0300 Subject: [PATCH 5/6] Fix Bug 59481 - Fix errors when starting the container (#530) * Update the rabbitmq version * Fix incorrect replacement of worker_connections * Limiting the maximum number of simultaneous connections due to possible memory shortage --- Dockerfile | 3 ++- run-document-server.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ebd56d..55e4b6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ chmod 644 /etc/apt/trusted.gpg.d/onlyoffice.gpg && \ 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 && \ apt-get -yq install \ adduser \ apt-utils \ @@ -45,7 +46,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ postgresql \ postgresql-client \ pwgen \ - rabbitmq-server \ + rabbitmq-server=3.10* \ redis-server \ software-properties-common \ sudo \ diff --git a/run-document-server.sh b/run-document-server.sh index f290e8d..79404e6 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -73,7 +73,8 @@ NGINX_ONLYOFFICE_EXAMPLE_CONF="${NGINX_ONLYOFFICE_EXAMPLE_PATH}/includes/ds-exam NGINX_CONFIG_PATH="/etc/nginx/nginx.conf" NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1} -NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$(ulimit -n)} +# Limiting the maximum number of simultaneous connections due to possible memory shortage +[ $(ulimit -n) -gt 1048576 ] && NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-1048576} || NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$(ulimit -n)} JWT_ENABLED=${JWT_ENABLED:-true} From e5f8e69d89713289a3473b36a96522c40dd0fe66 Mon Sep 17 00:00:00 2001 From: Semyon Bezrukov Date: Thu, 1 Dec 2022 15:53:43 +0300 Subject: [PATCH 6/6] Fix package url (#551) --- .github/workflows/4testing-build.yml | 2 +- .github/workflows/stable-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/4testing-build.yml b/.github/workflows/4testing-build.yml index 4343507..4216777 100644 --- a/.github/workflows/4testing-build.yml +++ b/.github/workflows/4testing-build.yml @@ -125,7 +125,7 @@ jobs: export PRODUCT_EDITION export PACKAGE_VERSION=${PRODUCT_VERSION}-${BUILD_NUMBER} - export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}/${RELEASE_BRANCH}/ubuntu + export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL_OLD }}/${RELEASE_BRANCH}/ubuntu export RELEASE_BRANCH export PLATFORM export DOCKERFILE=Dockerfile diff --git a/.github/workflows/stable-build.yml b/.github/workflows/stable-build.yml index d8278f2..26eff41 100644 --- a/.github/workflows/stable-build.yml +++ b/.github/workflows/stable-build.yml @@ -120,7 +120,7 @@ jobs: run: | set -eux export PRODUCT_EDITION=${{ matrix.edition }} - export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}/testing/ubuntu + export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL_OLD }}/testing/ubuntu export DOCKERFILE=Dockerfile export BASE_IMAGE=ubuntu:20.04 export PG_VERSION=12