Compare commits

...

95 Commits

Author SHA1 Message Date
849cb4ee70 fix Bug 78722 - Add admin panel and example service autostart options 2026-01-28 09:38:55 +00:00
058d512af2 fix Bug 78997 - Run plugin manager in background during startup 2026-01-23 05:37:57 +02:00
9ee11e40c0 fix Bug 78949 - Fix RabbitMQ startup failure due to ulimit nofile changes 2026-01-22 06:11:39 +02:00
0362706b26 Add env var PKG_NATIVE_CACHE_PATH to control pkg native cache location; For Bug 76727 2025-12-30 17:12:58 +03:00
3056ddb7b6 Merge branch hotfix/v9.2.1 into release/v9.3.0 2025-12-17 15:37:15 +00:00
7bb59095a5 Merge branch release/v9.2.0 into develop 2025-12-10 10:31:48 +00:00
ce58202562 Merge branch release/v9.2.0 into master 2025-12-01 07:34:32 +00:00
d3d6bcf8b4 fix bug 78605 - Prevent SIGTERM shutdown hang on log tailing 2025-11-24 11:43:57 +00:00
c1c4f9793a Fix secrets name 2025-11-24 10:55:46 +00:00
ec12b6a021 4enterprise release separately with separate logins 2025-11-24 10:55:46 +00:00
feadbdf42b Add empty directory for local font cache 2025-11-13 08:52:10 +00:00
b13570f221 Add msfonts caching to avoid install issues 2025-11-13 08:52:10 +00:00
32b11818cc Disable zap ajax spider untill action not fixed 2025-11-11 15:14:03 +00:00
d20143734d Fix cosmetic typos in README 2025-11-01 14:44:54 +03:00
0da835b7ae Merge branch release/v9.1.0 into develop 2025-10-28 12:01:25 +00:00
818573b9ba fix Bug 77433 - Fix duplicate tables in public when using DB_SCHEMA 2025-10-24 11:43:09 +00:00
92936a7971 Fix bug 71003 - Install plugins before services start (#51)
Co-authored-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
Co-committed-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
2025-10-24 11:41:36 +00:00
ba4961c28f Update important notice 2025-10-15 12:15:01 +00:00
5279cd3ea4 Merge branch release/v9.1.0 into master 2025-10-14 14:45:54 +00:00
a26d08992a Fix bug 70360 - Add NGINX_ACCESS_LOG to enable nginx access logs (#49)
Co-authored-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
Co-committed-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
2025-10-07 12:00:52 +00:00
5da9390fe6 fix Bug 77296 - Correct the display of adminpanel logs 2025-10-07 13:17:07 +02:00
1e6815a0c0 Fix the error of missing pgPoolExtraOptions when installing DB_SCHEMA 2025-10-03 17:46:02 +02:00
fce9f747a2 Disable automatic startup of the adminpanel service after installation 2025-10-03 15:17:17 +02:00
b42b6628e6 Add the missing field secret.browser.string 2025-09-25 19:35:33 +02:00
1197520921 Add support for specifying schema in psql 2025-09-23 07:38:07 +00:00
d937c9aa89 Add the ability to specify additional redis parameters 2025-09-15 19:50:43 +02:00
289ce658d9 Fix Docker startup; Add adminpanel log dir creation 2025-09-06 15:33:54 +03:00
c533386cd9 Feature/Add supervisor admin-panel services 2025-09-04 19:44:51 +03:00
fc99345e11 Fix typos in comments 2025-08-27 16:17:33 +03:00
f6cf4c37c1 Update to modern LABEL maintainer syntax 2025-08-27 16:13:19 +03:00
bd0a5d0099 Merge branch hotfix/v9.0.4 into develop 2025-08-06 08:34:58 +00:00
00aee48855 Merge branch hotfix/v9.0.4 into master 2025-08-05 14:15:32 +00:00
38946cb641 Add provenance information to bake build steps 2025-08-04 13:47:08 +03:00
0671c29443 Add SBOM generation to Docker buildx bake steps 2025-08-01 17:29:07 +03:00
a610326360 Merge branch hotfix/v9.0.3 into develop 2025-07-29 10:49:40 +00:00
2273e04980 Update README file 2025-07-10 16:13:41 +05:00
3c5f2f40a6 Add workflow to enforce Docker Hub README size limit 2025-07-10 15:51:32 +05:00
50d7503004 Merge branch hotfix/v9.0.3 into master 2025-07-08 11:43:45 +00:00
58c97b868f Merge branch hotfix/v9.0.2 into develop 2025-07-07 14:45:32 +00:00
7f46a5be42 Add step to update Docker Hub README 2025-07-02 12:43:29 +05:00
e05a117d08 Merge branch release/v9.0.0 into develop 2025-06-27 14:26:14 +00:00
23dc78fab4 fix Bug 75324 - Update permissions for runtime.json 2025-06-27 14:06:13 +03:00
448caaf01d Update readme.md 2025-06-25 17:08:01 +03:00
2d7c015e6d Merge branch release/v9.0.0 into master 2025-06-18 09:29:24 +00:00
2480f24dfd Fix the issue with the certificate files 2025-06-15 16:22:35 +03:00
1d7b5cc6a6 Fix the issue with the certificate files 2025-06-11 16:42:17 +03:00
0fad4d043f Set correct ownership for data directories (#29) 2025-06-10 14:49:12 +00:00
bd275e8276 Streamline docker-compose by pinning RabbitMQ & PostgreSQL and adding healthchecks (#28) 2025-06-10 14:48:57 +00:00
68760883fe Fix certificates retrieval in directory (#26) 2025-06-10 14:48:14 +00:00
a085cb962b Fix Oracle Instant Client installation 2025-05-19 09:52:22 +03:00
1bdda91da3 Fix multi-arch libaio symlink 2025-05-15 18:43:59 +03:00
11f153dd60 Fix bug 73689 – Replace hardcoded PDB and add libaio symlink (#23)
Co-authored-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
Co-committed-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
2025-05-15 09:23:04 +00:00
019d1b881f Fix bug 73600 - Add DB name to MSSQL connection 2025-05-13 16:23:12 +03:00
39b82a3c9a build: add conditional tagging for latest in stable-build workflow
- Introduced  input in the GitHub Actions workflow with a default value of . - Passed the  input as an environment variable () to the workflow. - Updated  to conditionally add the  Docker tag based on  value.
2025-04-24 14:17:08 +03:00
d50eda45dd Merge branch hotfix/v8.3.3 into release/v9.0.0 2025-04-21 09:10:33 +00:00
6d856cc70f Merge branch hotfix/v8.3.3 into develop 2025-04-21 09:10:32 +00:00
ede8569ec2 Update README.md 2025-04-16 19:01:05 +03:00
ff98f18cb9 Merge branch hotfix/v8.3.2 into release/v9.0.0 2025-04-01 08:42:09 +00:00
b8dabf842d Merge branch hotfix/v8.3.2 into develop 2025-04-01 08:42:07 +00:00
9c2012b534 Bump zap scanner action version
Fix deprecated artifacts included action
2025-03-11 09:58:54 +00:00
0fecfc5d4c Merge branch hotfix/v8.3.1 into develop 2025-03-10 08:33:41 +00:00
22f8a1004f Merge branch hotfix/v8.3.1 into master 2025-02-27 13:24:28 +00:00
2df1459d80 Merge branch release/v8.3.0 into develop 2025-02-24 09:14:43 +00:00
f4ae743455 Restrict the directories for log collection (#10)
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/Docker-DocumentServer/pulls/10
2025-02-12 11:22:49 +00:00
c867cf5eb7 Fix issue with building documentserver-ucs 2025-02-10 07:38:11 +00:00
0de571477f Merge branch release/v8.3.0 into master 2025-02-05 17:25:46 +00:00
a8b1256d87 fix Bug 72356 - Fix security issue with shell variables 2025-01-13 15:34:29 +05:00
a349692e60 Add folder description (#16) 2025-01-10 13:35:29 +00:00
4ed8027cbe Fix bug 72341 - Injections with operating system commands (#15)
Co-authored-by: danilapog <danil.titarenko@onlyoffice.com>
Co-committed-by: danilapog <danil.titarenko@onlyoffice.com>
2025-01-09 14:34:43 +00:00
e9f55325d9 Fixbug #72289 2024-12-28 08:44:33 +00:00
9b55149e51 Fix issue with building Dockerfile for arm64 arch 2024-12-20 09:47:22 +05:00
2e4c0e7ebc Update base image to 24.04 (#13)
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/Docker-DocumentServer/pulls/13
Reviewed-by: Alexey Golubev <Alexey.Golubev@onlyoffice.com>
Co-authored-by: Nasrullo Nurullaev <nasrullo.nurullaev@onlyoffice.com>
Co-committed-by: Nasrullo Nurullaev <nasrullo.nurullaev@onlyoffice.com>
2024-12-16 07:38:40 +00:00
19c2c0bf7d Merge branch hotfix/v8.2.2 into release/v8.3.0 2024-12-09 12:10:33 +00:00
b1fda38596 Merge branch hotfix/v8.2.2 into develop 2024-12-09 12:10:32 +00:00
c53b6dc6be Merge branch hotfix/v8.2.2 into master 2024-11-28 12:25:15 +00:00
330f5a4969 fix Bug 71832 - Fix the handling for .pem certificates 2024-11-25 14:37:52 +03:00
3d89aae7ee Merge branch hotfix/v8.2.1 into develop 2024-11-22 10:55:47 +00:00
0b670630f5 Merge branch release/v8.2.0 into develop 2024-10-21 11:56:45 +00:00
0052a31583 Merge branch release/v8.2.0 into master 2024-10-17 11:16:26 +00:00
510128a3cc Fix to resolve the unknown "cache_tag" variable error 2024-10-16 16:01:14 +07:00
84443a0095 fix Bug 70772 - Add the APPLICATION_NAME variable to ds-docservice 2024-10-11 15:46:53 +07:00
a1b238d180 Fix the option to enable plugins to true by default 2024-10-07 16:29:01 +07:00
85a678008a Merge pull request 'Replace library symlinks with LD_LIBRARY_PATH env' (#7) from feature/library-path into release/v8.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/Docker-DocumentServer/pulls/7
2024-09-23 14:42:52 +00:00
e815a55687 Replace library symlinks with LD_LIBRARY_PATH env 2024-09-23 20:22:05 +07:00
1581d5b3fb fix Bug 69800 - Fix warning in casing mismatch 2024-09-18 07:34:43 +00:00
cf34136b58 Fix bug 70234 - getTableColumnsError
Error on damengdb connect
2024-09-16 22:39:48 +03:00
5a1597b6ed Merge branch 'hotfix/v8.1.3' into release/v8.2.0 2024-09-13 18:58:49 +07:00
ed000589d4 Merge branch hotfix/v8.1.3 into develop 2024-09-13 11:41:33 +00:00
aeba194cf1 Merge branch hotfix/v8.1.3 into master 2024-09-13 11:41:32 +00:00
ca1a38e440 Disable plugin installation when building the docker image (#3)
Co-authored-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
Co-committed-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
2024-09-05 11:47:11 +00:00
bf55775663 Add an optional option to enable plugins (#1)
Co-authored-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
Co-committed-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
2024-09-05 14:31:36 +03:00
bef214b20e Merge hotfix/v8.1.1 into master 2024-09-05 11:28:21 +00:00
b8f4133434 Add an optional option to enable plugins (#1)
Co-authored-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
Co-committed-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
2024-09-05 07:57:32 +00:00
893de2e916 fix Bug 66601 - Add fixes to WOPI modulus configuration (#756) 2024-08-13 13:04:06 +03:00
67578bb016 Merge branch hotfix/v8.1.1 into develop 2024-07-26 08:13:31 +00:00
17 changed files with 390 additions and 253 deletions

View File

@ -47,25 +47,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: matrix
env:
BRANCH_NAME: ${{ github.ref_name }}
AMD64: ${{ github.event.inputs.amd64 }}
ARM64: ${{ github.event.inputs.arm64 }}
COMMUNITY: ${{ github.event.inputs.community }}
ENTERPRISE: ${{ github.event.inputs.enterprise }}
DEVELOPER: ${{ github.event.inputs.developer }}
run: |
set -ex
BRANCH_NAME=${GITHUB_REF#refs/heads/}
if ! [[ $BRANCH_NAME == develop || $BRANCH_NAME =~ hotfix || $BRANCH_NAME =~ release ]]; then
if ! [[ "$BRANCH_NAME" == develop || "$BRANCH_NAME" =~ hotfix || "$BRANCH_NAME" =~ release ]]; then
echo "Wrong branch."
exit 1
fi
[ ${{ github.event.inputs.amd64 }} = true ] && PLATFORMS+=("amd64")
[ ${{ github.event.inputs.arm64 }} = true ] && PLATFORMS+=("arm64")
[ "${AMD64}" = true ] && PLATFORMS+=("amd64")
[ "${ARM64}" = true ] && PLATFORMS+=("arm64")
if [ -z ${PLATFORMS} ]; then
echo "None of the platforms are selected."
exit 1
fi
[ ${{ github.event.inputs.community }} = true ] && EDITIONS+=("community")
[ ${{ github.event.inputs.enterprise }} = true ] && EDITIONS+=("enterprise")
[ ${{ github.event.inputs.developer }} = true ] && EDITIONS+=("developer")
[ "${COMMUNITY}" = true ] && EDITIONS+=("community")
[ "${ENTERPRISE}" = true ] && EDITIONS+=("enterprise")
[ "${DEVELOPER}" = true ] && EDITIONS+=("developer")
if [ -z ${EDITIONS} ]; then
echo "None of the editions are selected."
exit 1
@ -100,14 +106,38 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Prepare fonts cache
id: fonts
uses: actions/cache@v4
with:
path: fonts
key: fonts-${{ runner.os }}-v1
- name: Install fonts if not cached
if: steps.fonts.outputs.cache-hit != 'true'
run: |
sudo apt-get update
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer
mkdir -p fonts/msttcorefonts
cp -a /usr/share/fonts/truetype/msttcorefonts/* fonts/msttcorefonts/
- name: Build 4testing
id: build-ds
env:
BRANCH_NAME: ${{ github.ref_name }}
AMD64: ${{ github.event.inputs.amd64 }}
ARM64: ${{ github.event.inputs.arm64 }}
BUILD_NUMBER: ${{ github.event.inputs.build }}
EDITION: ${{ matrix.edition }}
IMAGE: ${{ matrix.image }}
PACKAGE_BASEURL: ${{ secrets.REPO_BASEURL }}
run: |
set -eux
### ==>> At this step build variable declaration ###
case ${{ matrix.edition }} in
case "${EDITION}" in
community)
PRODUCT_EDITION=""
;;
@ -119,23 +149,20 @@ jobs:
;;
esac
[ ${{ github.event.inputs.amd64 }} = true ] && PLATFORMS+=("amd64")
[ ${{ github.event.inputs.arm64 }} = true ] && PLATFORMS+=("arm64")
[ "${AMD64}" = true ] && PLATFORMS+=("amd64")
[ "${ARM64}" = true ] && PLATFORMS+=("arm64")
PLATFORM=$(echo ${PLATFORMS[*]/#/linux/} | tr ' ' ',')
BRANCH_NAME=${GITHUB_REF#refs/heads/}
if [ $BRANCH_NAME = develop ]; then
if [ "$BRANCH_NAME" = develop ]; then
BUILD_CHANNEL=nightly
PRODUCT_VERSION=99.99.99
elif [[ $BRANCH_NAME =~ hotfix || $BRANCH_NAME =~ release ]]; then
elif [[ "$BRANCH_NAME" =~ hotfix || "$BRANCH_NAME" =~ release ]]; then
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 }}
export BUILD_CHANNEL
export PLATFORM
export DOCKERFILE=Dockerfile
@ -144,7 +171,7 @@ jobs:
### ==>> Build and push images at this step ###
docker buildx bake -f docker-bake.hcl ${{ matrix.image }} --push
docker buildx bake --sbom=true --provenance=mode=max -f docker-bake.hcl "${IMAGE}" --push
echo "DONE: Build success"
### Set output for Zap scanner
@ -165,10 +192,11 @@ jobs:
VERSION: ${{ steps.build-ds.outputs.version }}
BRANCH: ${{ steps.build-ds.outputs.branch }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
REPO: ${{ github.repository }}
run: |
gh workflow run zap-ds.yaml \
--repo ${{ github.repository }} \
-f branch=${BRANCH} \
-f version=${VERSION}
--repo "${REPO}" \
-f branch="${BRANCH}" \
-f version="${VERSION}"
shell: bash

View File

@ -0,0 +1,30 @@
name: Check DockerHub README limit
on:
push:
paths:
- README.md
env:
MAX_BYTES: "25000"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Measure size
id: measure
run: |
BYTES=$(wc -c < README.md | tr -d '[:space:]')
echo "BYTES=$BYTES" >> "$GITHUB_OUTPUT"
- name: Fail if oversize
run: |
BYTES='${{ steps.measure.outputs.BYTES }}'
echo "README.md size: $BYTES bytes (limit $MAX_BYTES)"
if [ "$BYTES" -gt "$MAX_BYTES" ]; then
echo "::error::README.md exceeds Docker Hub 25 KB limit"
exit 1
fi

View File

@ -14,10 +14,18 @@ on:
type: string
required: true
default: '1'
latest:
description: 'Push latest tag?'
type: boolean
required: true
default: true
env:
COMPANY_NAME: "onlyoffice"
PRODUCT_NAME: "documentserver"
PRODUCT_NAME: "documentserver"
VERSION: ${{ github.event.inputs.tag }}
RELEASE_NUMBER: ${{ github.event.inputs.release_number }}
LATEST: ${{ github.event.inputs.latest }}
jobs:
build:
@ -45,22 +53,55 @@ jobs:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build documentserver-release
env:
TARGET: ${{ matrix.images }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
VERSION=${{ github.event.inputs.tag }}
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
PRODUCT_EDITION=${{ matrix.edition }}
TESTING_IMAGE=${COMPANY_NAME}/4testing-${PRODUCT_NAME}${PRODUCT_EDITION}
export PRODUCT_EDITION
export PULL_TAG=${VERSION}
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
export SHORTER_TAG=${VERSION%.*}
export SHORTEST_TAG=${VERSION%.*.*}
docker buildx bake -f docker-bake.hcl ${{ matrix.images }} --push
docker buildx bake --sbom=true --provenance=mode=max -f docker-bake.hcl "${TARGET}" --push
echo "DONE: Build success >> exit with 0"
exit 0
shell: bash
- name: Update Docker Hub README
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
repository: ${{ env.COMPANY_NAME }}/${{ env.PRODUCT_NAME }}${{ matrix.edition }}
release_4enterprise:
name: "Release image: onlyoffice4enterprise"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME_ENTERPRISE }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN_ENTERPRISE }}
- name: release 4enterpise
shell: bash
run: |
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
docker buildx imagetools create --tag onlyoffice4enterprise/documentserver-ee:${TAG} \
onlyoffice/4testing-documentserver-ee:${VERSION}
build-nonexample:
name: "Release image: DocumentServer${{ matrix.edition }}-nonExample"
runs-on: ubuntu-latest
@ -88,14 +129,14 @@ jobs:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: build image
env:
TARGET: ${{ matrix.images }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
VERSION=${{ github.event.inputs.tag }}
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
export PULL_TAG=${VERSION%.*}.${RELEASE_NUMBER}
export PRODUCT_EDITION=${{ matrix.edition }}
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
docker buildx bake -f docker-bake.hcl ${{ matrix.images }} --push
docker buildx bake --sbom=true --provenance=mode=max -f docker-bake.hcl "${TARGET}" --push
shell: bash
build-ucs-ubuntu20:
@ -122,16 +163,16 @@ jobs:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: build UCS
env:
PACKAGE_BASEURL: ${{ secrets.REPO_BASEURL }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
VERSION=${{ github.event.inputs.tag }}
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
export PRODUCT_EDITION=${{ matrix.edition }}
export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}
export DOCKERFILE=Dockerfile
export BASE_VERSION=20.04
export PG_VERSION=12
export PACKAGE_SUFFIX=
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
export PACKAGE_VERSION=$( echo ${VERSION} | sed -E 's/(.*)\./\1-/')
docker buildx bake -f docker-bake.hcl documentserver-ucs --push
docker buildx bake --sbom=true --provenance=mode=max -f docker-bake.hcl documentserver-ucs --push
shell: bash

View File

@ -61,10 +61,10 @@ jobs:
# -j mean that scanning use AJAX Spider, with this spider the scan takes approximately an hour
# Without any cmd options will be used default spider and the scan takes approximately ~10-15 minutes
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.8.0
uses: zaproxy/action-full-scan@v0.12.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
target: 'https://${{ steps.run-ds.outputs.local-ip }}/'
allow_issue_writing: false
cmd_options: '-j'
#cmd_options: '-j'

View File

@ -1,32 +1,36 @@
ARG BASE_VERSION=22.04
ARG BASE_VERSION=24.04
ARG BASE_IMAGE=ubuntu:$BASE_VERSION
FROM ${BASE_IMAGE} as documentserver
LABEL maintainer Ascensio System SIA <support@onlyoffice.com>
FROM ${BASE_IMAGE} AS documentserver
LABEL maintainer="Ascensio System SIA <support@onlyoffice.com>"
ARG BASE_VERSION
ARG PG_VERSION=14
ARG PG_VERSION=16
ARG PACKAGE_SUFFIX=t64
ENV OC_RELEASE_NUM=21
ENV OC_RU_VER=12
ENV OC_RELEASE_NUM=23
ENV OC_RU_VER=7
ENV OC_RU_REVISION_VER=0
ENV OC_RESERVED_NUM=0
ENV OC_RU_DATE=0
ENV OC_PATH=${OC_RELEASE_NUM}${OC_RU_VER}000
ENV OC_FILE_SUFFIX=${OC_RELEASE_NUM}.${OC_RU_VER}.${OC_RU_REVISION_VER}.${OC_RESERVED_NUM}.${OC_RU_DATE}${OC_FILE_SUFFIX}dbru
ENV OC_RESERVED_NUM=25
ENV OC_RU_DATE=01
ENV OC_PATH=${OC_RELEASE_NUM}${OC_RU_VER}0000
ENV OC_FILE_SUFFIX=${OC_RELEASE_NUM}.${OC_RU_VER}.${OC_RU_REVISION_VER}.${OC_RESERVED_NUM}.${OC_RU_DATE}
ENV OC_VER_DIR=${OC_RELEASE_NUM}_${OC_RU_VER}
ENV OC_DOWNLOAD_URL=https://download.oracle.com/otn_software/linux/instantclient/${OC_PATH}
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=${PG_VERSION} BASE_VERSION=${BASE_VERSION}
ARG ONLYOFFICE_VALUE=onlyoffice
COPY fonts/ /usr/share/fonts/truetype/
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
apt-get -y update && \
apt-get -yq install wget apt-transport-https gnupg locales lsb-release && \
wget -q -O /etc/apt/sources.list.d/mssql-release.list https://packages.microsoft.com/config/ubuntu/$BASE_VERSION/prod.list && \
wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
wget -q -O /etc/apt/sources.list.d/mssql-release.list "https://packages.microsoft.com/config/ubuntu/$BASE_VERSION/prod.list" && \
wget -q -O /tmp/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc && \
apt-key add /tmp/microsoft.asc && \
gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg < /tmp/microsoft.asc && \
apt-get -y update && \
locale-gen en_US.UTF-8 && \
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
@ -38,8 +42,8 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
cron \
curl \
htop \
libaio1 \
libasound2 \
libaio1${PACKAGE_SUFFIX} \
libasound2${PACKAGE_SUFFIX} \
libboost-regex-dev \
libcairo2 \
libcurl3-gnutls \
@ -69,8 +73,9 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
unzip \
xvfb \
xxd \
zlib1g && \
if [ $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -ne 61 ]; \
zlib1g || dpkg --configure -a && \
# Added dpkg --configure -a to handle installation issues with rabbitmq-server on arm64 architecture
if [ $(find /usr/share/fonts/truetype/msttcorefonts -maxdepth 1 -type f -iname '*.ttf' | wc -l) -lt 30 ]; \
then echo 'msttcorefonts failed to download'; exit 1; fi && \
echo "SERVER_ADDITIONAL_ERL_ARGS=\"+S 1:1\"" | tee -a /etc/rabbitmq/rabbitmq-env.conf && \
sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf && \
@ -79,11 +84,12 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
service postgresql restart && \
sudo -u postgres psql -c "CREATE USER $ONLYOFFICE_VALUE WITH password '$ONLYOFFICE_VALUE';" && \
sudo -u postgres psql -c "CREATE DATABASE $ONLYOFFICE_VALUE OWNER $ONLYOFFICE_VALUE;" && \
wget -O basic.zip ${OC_DOWNLOAD_URL}/instantclient-basic-linux.x64-${OC_FILE_SUFFIX}.zip && \
wget -O sqlplus.zip ${OC_DOWNLOAD_URL}/instantclient-sqlplus-linux.x64-${OC_FILE_SUFFIX}.zip && \
unzip -d /usr/share basic.zip && \
unzip -d /usr/share sqlplus.zip && \
wget -O basic.zip ${OC_DOWNLOAD_URL}/instantclient-basic-linux.$(dpkg --print-architecture | sed 's/amd64/x64/')-${OC_FILE_SUFFIX}.zip && \
wget -O sqlplus.zip ${OC_DOWNLOAD_URL}/instantclient-sqlplus-linux.$(dpkg --print-architecture | sed 's/amd64/x64/')-${OC_FILE_SUFFIX}.zip && \
unzip -o basic.zip -d /usr/share && \
unzip -o sqlplus.zip -d /usr/share && \
mv /usr/share/instantclient_${OC_VER_DIR} /usr/share/instantclient && \
find /usr/lib /lib -name "libaio.so.1$PACKAGE_SUFFIX" -exec bash -c 'ln -sf "$0" "$(dirname "$0")/libaio.so.1"' {} \; && \
service postgresql stop && \
service redis-server stop && \
service rabbitmq-server stop && \
@ -108,6 +114,7 @@ ARG PACKAGE_BASEURL="http://download.onlyoffice.com/install/documentserver/linux
ENV COMPANY_NAME=$COMPANY_NAME \
PRODUCT_NAME=$PRODUCT_NAME \
PRODUCT_EDITION=$PRODUCT_EDITION \
DS_PLUGIN_INSTALLATION=false \
DS_DOCKER_INSTALLATION=true
RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VERSION:+_$PACKAGE_VERSION}_${TARGETARCH:-$(dpkg --print-architecture)}.deb" && \
@ -115,15 +122,17 @@ RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VER
apt-get -y update && \
service postgresql start && \
apt-get -yq install /tmp/$PACKAGE_FILE && \
PGPASSWORD=$ONLYOFFICE_VALUE dropdb -h localhost -p 5432 -U $ONLYOFFICE_VALUE $ONLYOFFICE_VALUE && \
sudo -u postgres psql -c "DROP ROLE onlyoffice;" && \
service postgresql stop && \
chmod 755 /etc/init.d/supervisor && \
sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i /etc/supervisor/conf.d/*.conf && \
service supervisor stop && \
chmod 755 /app/ds/*.sh && \
printf "\nGO" >> /var/www/$COMPANY_NAME/documentserver/server/schema/mssql/createdb.sql && \
printf "\nGO" >> /var/www/$COMPANY_NAME/documentserver/server/schema/mssql/removetbl.sql && \
printf "\nexit" >> /var/www/$COMPANY_NAME/documentserver/server/schema/oracle/createdb.sql && \
printf "\nexit" >> /var/www/$COMPANY_NAME/documentserver/server/schema/oracle/removetbl.sql && \
printf "\nGO" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/mssql/createdb.sql" && \
printf "\nGO" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/mssql/removetbl.sql" && \
printf "\nexit" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/oracle/createdb.sql" && \
printf "\nexit" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/oracle/removetbl.sql" && \
rm -f /tmp/$PACKAGE_FILE && \
rm -rf /var/log/$COMPANY_NAME && \
rm -rf /var/lib/apt/lists/*

126
README.md
View File

@ -20,28 +20,34 @@
## Overview
ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
ONLYOFFICE Docs (Document Server) is an open-source office suite that comprises all the tools you need to work with documents, spreadsheets, presentations, PDFs, and PDF forms. The suite supports office files of all popular formats (DOCX, ODT, XLSX, ODS, CSV, PPTX, ODP, etc.) and enables collaborative editing in real time.
Starting from version 6.0, Document Server is distributed as ONLYOFFICE Docs. It has [three editions](https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions). With this image, you will install the free Community version.
Starting from version 6.0, Document Server is distributed as ONLYOFFICE Docs. It has [three editions](https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-docs-editions). With this image, you will install the free Community version.
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.
ONLYOFFICE Docs can be used as a part of [ONLYOFFICE DocSpace](https://www.onlyoffice.com/docspace.aspx) and ONLYOFFICE Workspace, or with [third-party sync&share solutions](https://www.onlyoffice.com/all-connectors.aspx) (e.g. Odoo, Moodle, Nextcloud, ownCloud, Seafile, etc.) to enable collaborative editing within their interface.
***Important*** Please update `docker-engine` 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
***Important*** Please update `docker-engine` to latest version (`20.10.21` as of writing this doc) before using it. We use `ubuntu:24.04` as base image and it older versions of docker have compatibility problems with it
## Functionality ##
* ONLYOFFICE Document Editor
* ONLYOFFICE Spreadsheet Editor
* ONLYOFFICE Presentation Editor
* ONLYOFFICE Documents application for iOS
* Collaborative editing
* Hieroglyph support
* Support for all the popular formats: DOC, DOCX, TXT, ODT, RTF, ODP, EPUB, ODS, XLS, XLSX, CSV, PPTX, HTML
Integrating it with ONLYOFFICE Community Server you will be able to:
* view and edit files stored on Drive, Box, Dropbox, OneDrive, OwnCloud connected to ONLYOFFICE;
* share files;
* embed documents on a website;
* manage access rights to documents.
Take advantage of the powerful editors included in ONLYOFFICE Docs:
* [ONLYOFFICE Document Editor](https://www.onlyoffice.com/document-editor.aspx)
* [ONLYOFFICE Spreadsheet Editor](https://www.onlyoffice.com/spreadsheet-editor.aspx)
* [ONLYOFFICE Presentation Editor](https://www.onlyoffice.com/presentation-editor.aspx)
* [ONLYOFFICE Form Creator](https://www.onlyoffice.com/form-creator.aspx)
* [ONLYOFFICE PDF Editor](https://www.onlyoffice.com/pdf-editor.aspx)
* [ONLYOFFICE Diagram Viewer](https://www.onlyoffice.com/diagram-viewer.aspx)
The editors empower you to create, edit, save, and export text docs, sheets, presentations, PDFs, create and fill out PDF forms, open diagrams, all while offering additional advanced features such as:
* Collaborative editing (review & track changes, comments, chat)
* [AI-powered assistants](https://www.onlyoffice.com/ai-assistants.aspx)
* Spell-checking
* Scalable UI options (including dark mode)
* [Security tools & services](https://www.onlyoffice.com/security.aspx)
ONLYOFFICE Docs offer support for plugins allowing you to add specific features to the editors that are not directly related to the OOXML format. For more details, see [our API](https://api.onlyoffice.com/docs/plugin-and-macros/get-started/overview/) or visit the [plugins repo](https://github.com/ONLYOFFICE/onlyoffice.github.io). Would like to explore the existing plugins? Open the [Marketplace](https://www.onlyoffice.com/app-directory).
## Recommended System Requirements
@ -94,7 +100,7 @@ To change the port, use the -p command. E.g.: to make your portal accessible via
sudo docker run -i -t -d -p 443:443 \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver
Access to the onlyoffice application can be secured using SSL so as to prevent unauthorized access. While a CA certified SSL certificate allows for verification of trust via the CA, a self signed certificates can also provide an equal level of trust verification as long as each client takes some additional steps to verify the identity of your website. Below the instructions on achieving this are provided.
Access to the ONLYOFFICE application can be secured using SSL so as to prevent unauthorized access. While a CA certified SSL certificate allows for verification of trust via the CA, a self-signed certificate can also provide an equal level of trust verification as long as each client takes some additional steps to verify the identity of your website. Below the instructions on achieving this are provided.
To secure the application via SSL basically two things are needed:
@ -106,7 +112,7 @@ So you need to create and install the following files:
/app/onlyoffice/DocumentServer/data/certs/tls.key
/app/onlyoffice/DocumentServer/data/certs/tls.crt
When using CA certified certificates (e.g [Let's encrypt](https://letsencrypt.org)), these files are provided to you by the CA. If you are using self-signed certificates you need to generate these files [yourself](#generation-of-self-signed-certificates).
When using CA certified certificates (e.g. [Let's Encrypt](https://letsencrypt.org)), these files are provided to you by the CA. If you are using self-signed certificates you need to generate these files [yourself](#generation-of-self-signed-certificates).
#### Using the automatically generated Let's Encrypt SSL Certificates
@ -150,9 +156,9 @@ openssl dhparam -out dhparam.pem 2048
#### Installation of the SSL Certificates
Out of the four files generated above, you need to install the `tls.key`, `tls.crt` and `dhparam.pem` files at the onlyoffice server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
Out of the four files generated above, you need to install the `tls.key`, `tls.crt` and `dhparam.pem` files at the ONLYOFFICE server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
The default path that the onlyoffice application is configured to look for the SSL certificates is at `/var/www/onlyoffice/Data/certs`, this can however be changed using the `SSL_KEY_PATH`, `SSL_CERTIFICATE_PATH` and `SSL_DHPARAM_PATH` configuration options.
The default path that the ONLYOFFICE application is configured to look for the SSL certificates is at `/var/www/onlyoffice/Data/certs`, this can however be changed using the `SSL_KEY_PATH`, `SSL_CERTIFICATE_PATH` and `SSL_DHPARAM_PATH` configuration options.
The `/var/www/onlyoffice/Data/` path is the path of the data store, which means that you have to create a folder named certs inside `/app/onlyoffice/DocumentServer/data/` and copy the files into it and as a measure of security you will update the permission on the `tls.key` file to only be readable by the owner.
@ -173,7 +179,7 @@ You are now just one step away from having our application secured.
Below is the complete list of parameters that can be set using environment variables.
- **ONLYOFFICE_HTTPS_HSTS_ENABLED**: Advanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults to `true`.
- **ONLYOFFICE_HTTPS_HSTS_MAXAGE**: Advanced configuration option for setting the HSTS max-age in the onlyoffice nginx vHost configuration. Applicable only when SSL is in use. Defaults to `31536000`.
- **ONLYOFFICE_HTTPS_HSTS_MAXAGE**: Advanced configuration option for setting the HSTS max-age in the ONLYOFFICE nginx vHost configuration. Applicable only when SSL is in use. Defaults to `31536000`.
- **SSL_CERTIFICATE_PATH**: The path to the SSL certificate to use. Defaults to `/var/www/onlyoffice/Data/certs/tls.crt`.
- **SSL_KEY_PATH**: The path to the SSL certificate's private key. Defaults to `/var/www/onlyoffice/Data/certs/tls.key`.
- **SSL_DHPARAM_PATH**: The path to the Diffie-Hellman parameter. Defaults to `/var/www/onlyoffice/Data/certs/dhparam.pem`.
@ -185,13 +191,19 @@ Below is the complete list of parameters that can be set using environment varia
- **DB_NAME**: The name of a database to use. Should be existing on container startup.
- **DB_USER**: The new user name with superuser permissions for the database account.
- **DB_PWD**: The password set for the database account.
- **DB_SCHEMA**: Database schema name (optional).
- **PostgreSQL** — schema for [search_path](https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH), default `public`.
- **MSSQL** — schema to set as [DEFAULT_SCHEMA](https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-user-transact-sql?view=sql-server-ver17#default_schema---schema_name--null-), default `dbo`.
- **AMQP_URI**: The [AMQP URI](https://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to message broker server.
- **AMQP_TYPE**: The message broker type. Supported values are `rabbitmq` or `activemq`. Defaults to `rabbitmq`.
- **REDIS_SERVER_HOST**: The IP address or the name of the host where the Redis server is running.
- **REDIS_SERVER_PORT**: The Redis server port number.
- **REDIS_SERVER_USER**: The Redis server username. The username is not set by default.
- **REDIS_SERVER_PASS**: The Redis server password. The password is not set by default.
- **REDIS_SERVER_DB**: The Redis database index number to select. Defaults to `0`.
- **NGINX_WORKER_PROCESSES**: Defines the number of nginx worker processes.
- **NGINX_WORKER_CONNECTIONS**: Sets the maximum number of simultaneous connections that can be opened by a nginx worker process.
- **NGINX_ACCESS_LOG**: Defines whether access logging is enabled. Defaults to `false`.
- **SECURE_LINK_SECRET**: Defines secret for the nginx config directive [secure_link_md5](https://nginx.org/en/docs/http/ngx_http_secure_link_module.html#secure_link_md5). Defaults to `random string`.
- **JWT_ENABLED**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Document Server. Defaults to `true`.
- **JWT_SECRET**: Defines the secret key to validate the JSON Web Token in the request to the ONLYOFFICE Document Server. Defaults to random value.
@ -200,18 +212,43 @@ Below is the complete list of parameters that can be set using environment varia
- **WOPI_ENABLED**: Specifies the enabling the wopi handlers. Defaults to `false`.
- **ALLOW_META_IP_ADDRESS**: Defines if it is allowed to connect meta IP address or not. Defaults to `false`.
- **ALLOW_PRIVATE_IP_ADDRESS**: Defines if it is allowed to connect private IP address or not. Defaults to `false`.
- **USE_UNAUTHORIZED_STORAGE**: Set to `true`if using selfsigned certificates for your storage server e.g. Nextcloud. Defaults to `false`
- **USE_UNAUTHORIZED_STORAGE**: Set to `true` if using self-signed certificates for your storage server e.g. Nextcloud. Defaults to `false`
- **GENERATE_FONTS**: When 'true' regenerates fonts list and the fonts thumbnails etc. at each start. Defaults to `true`
- **ADMINPANEL_ENABLED**: Enables admin panel service autostart. Defaults to `false`.
- **EXAMPLE_ENABLED**: Enables example service autostart. Defaults to `false`.
- **METRICS_ENABLED**: Specifies the enabling StatsD for ONLYOFFICE Document Server. Defaults to `false`.
- **METRICS_HOST**: Defines StatsD listening host. Defaults to `localhost`.
- **METRICS_PORT**: Defines StatsD listening port. Defaults to `8125`.
- **METRICS_PREFIX**: Defines StatsD metrics prefix for backend services. Defaults to `ds.`.
- **LETS_ENCRYPT_DOMAIN**: Defines the domain for Let's Encrypt certificate.
- **LETS_ENCRYPT_MAIL**: Defines the domain administator mail address for Let's Encrypt certificate.
- **LETS_ENCRYPT_MAIL**: Defines the domain administrator mail address for Let's Encrypt certificate.
- **PLUGINS_ENABLED**: Defines whether to enable default plugins. Defaults to `true`.
## Installing ONLYOFFICE Document Server integrated with Community and Mail Servers
## Installing ONLYOFFICE Document Server using Docker Compose
ONLYOFFICE Document Server is a part of ONLYOFFICE Community Edition that comprises also Community Server and Mail Server. To install them, follow these easy steps:
You can also install ONLYOFFICE Document Server using [docker-compose](https://docs.docker.com/compose/install "docker-compose").
First you need to clone this [GitHub repository](https://github.com/ONLYOFFICE/Docker-DocumentServer/):
```bash
git clone https://github.com/ONLYOFFICE/Docker-DocumentServer
```
After that switch to the repository folder:
```bash
cd Docker-DocumentServer
```
After that, assuming you have docker-compose installed, execute the following command:
```bash
docker-compose up -d
```
## Installing ONLYOFFICE Document Server as a part of ONLYOFFICE Workspace
ONLYOFFICE Document Server is a part of ONLYOFFICE Workspace that comprises also Community Server, Mail Server, and Control Panel. To install them, follow these easy steps:
**STEP 1**: Create the `onlyoffice` network.
@ -287,8 +324,9 @@ sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name o
-e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
-e MAIL_SERVER_DB_PORT=3306 \
-e MAIL_SERVER_DB_USER=root \
-e MAIL_SERVER_DB_PASS=my-secret-pw \
-e MAIL_SERVER_DB_PASS=my-secret-pw \
-e CONTROL_PANEL_PORT_80_TCP=80 \
-e CONTROL_PANEL_PORT_80_TCP_ADDR=onlyoffice-control-panel \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
@ -301,21 +339,21 @@ Where `${MAIL_SERVER_IP}` is the IP address for **ONLYOFFICE Mail Server**. You
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'.
Alternatively, you can use an automatic installation script to install ONLYOFFICE Workspace at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'.
**STEP 1**: Download the Community Edition Docker script file
**STEP 1**: Download the ONLYOFFICE Workspace Docker script file
```bash
wget https://download.onlyoffice.com/install/opensource-install.sh
wget https://download.onlyoffice.com/install/workspace-install.sh
```
**STEP 2**: Install ONLYOFFICE Community Edition executing the following command:
**STEP 2**: Install ONLYOFFICE Workspace executing the following command:
```bash
bash opensource-install.sh -md yourdomain.com
workspace-install.sh -md yourdomain.com
```
Or, use [docker-compose](https://docs.docker.com/compose/install "docker-compose"). For the mail server correct work you need to specify its hostname 'yourdomain.com'. Assuming you have docker-compose installed, execute the following command:
Or, use [docker-compose](https://docs.docker.com/compose/install "docker-compose"). First you need to clone this [GitHub repository](https://github.com/ONLYOFFICE/Docker-CommunityServer/):
```bash
wget https://raw.githubusercontent.com/ONLYOFFICE/Docker-CommunityServer/master/docker-compose.groups.yml
@ -352,7 +390,7 @@ For more information, visit the official [Docker manual site](https://docs.docke
As a relatively new project Docker is being worked on and actively developed by its community. So it's recommended to use the latest version of Docker, because the issues that you encounter might have already been fixed with a newer Docker release.
The known Docker issue with ONLYOFFICE Document Server with rpm-based distributives is that sometimes the processes fail to start inside Docker container. Fedora and RHEL/CentOS users should try disabling selinux with setenforce 0. If it fixes the issue then you can either stick with SELinux disabled which is not recommended by RedHat, or switch to using Ubuntu.
The known Docker issue with ONLYOFFICE Document Server with rpm-based distributives is that sometimes the processes fail to start inside Docker container. Fedora and RHEL/CentOS users should try disabling SELinux with setenforce 0. If it fixes the issue then you can either stick with SELinux disabled which is not recommended by Red Hat, or switch to using Ubuntu.
### Document Server usage issues
@ -366,21 +404,23 @@ Please note, that both executing the script and disconnecting users may take a l
## Project Information
Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS)
Official website: [www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS)
Code repository: [https://github.com/ONLYOFFICE/DocumentServer](https://github.com/ONLYOFFICE/DocumentServer "https://github.com/ONLYOFFICE/DocumentServer")
Code repository: [github.com/ONLYOFFICE/DocumentServer](https://github.com/ONLYOFFICE/DocumentServer "https://github.com/ONLYOFFICE/DocumentServer")
Docker Image: [https://github.com/ONLYOFFICE/Docker-DocumentServer](https://github.com/ONLYOFFICE/Docker-DocumentServer "https://github.com/ONLYOFFICE/Docker-DocumentServer")
Docker Image: [github.com/ONLYOFFICE/Docker-DocumentServer](https://github.com/ONLYOFFICE/Docker-DocumentServer "https://github.com/ONLYOFFICE/Docker-DocumentServer")
License: [GNU AGPL v3.0](https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=4358397&doc=K0ZUdlVuQzQ0RFhhMzhZRVN4ZFIvaHlhUjN2eS9XMXpKR1M5WEppUk1Gcz0_IjQzNTgzOTci0 "GNU AGPL v3.0")
License: [GNU AGPL v3.0](https://onlyo.co/38YZGJh)
Free version vs commercial builds comparison: https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions
SaaS version: [https://www.onlyoffice.com/cloud-office.aspx](https://www.onlyoffice.com/cloud-office.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS)
Free version vs commercial builds comparison: https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-docs-editions
## User Feedback and Support
If you have any problems with or questions about this image, please visit our official forum to find answers to your questions: [forum.onlyoffice.com][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][2].
If you face any issues or have questions about this image, visit our official forum: [forum.onlyoffice.com][1].
You are also welcome to ask and answer ONLYOFFICE development questions on [Stack Overflow][2], as well as share your suggestions on [feedback.onlyoffice.com](https://feedback.onlyoffice.com/forums/966080-your-voice-matters).
Join [our Discord community](https://discord.gg/Hcgtf5n4uF) for connecting with fellow developers.
[1]: https://forum.onlyoffice.com
[2]: https://stackoverflow.com/questions/tagged/onlyoffice
[2]: https://stackoverflow.com/questions/tagged/onlyoffice

View File

@ -1,108 +0,0 @@
version: '2.1'
x-ds-image:
&ds-image
${COMPANY_NAME:-onlyoffice}/${PRODUCT_NAME:-documentserver-de}:${PRODUCT_VERSION:-latest}
services:
onlyoffice-documentserver-data:
container_name: onlyoffice-documentserver-data
image: *ds-image
environment:
- ONLYOFFICE_DATA_CONTAINER=true
- DB_HOST=onlyoffice-postgresql
- DB_PORT=5432
- DB_NAME=onlyoffice
- DB_USER=onlyoffice
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
- REDIS_SERVER_HOST=onlyoffice-redis
- REDIS_SERVER_PORT=6379
# Uncomment strings below to enable the JSON Web Token validation.
#- JWT_ENABLED=true
#- JWT_SECRET=secret
#- JWT_HEADER=Authorization
#- JWT_IN_BODY=true
stdin_open: true
restart: always
volumes:
- /etc/onlyoffice
- /var/www/onlyoffice/Data
- /var/log/onlyoffice
- /var/lib/onlyoffice/documentserver/App_Data/cache/files
- /var/www/onlyoffice/documentserver-example/public/files
- /usr/share/fonts
onlyoffice-documentserver:
image: *ds-image
depends_on:
- onlyoffice-documentserver-data
- onlyoffice-postgresql
- onlyoffice-redis
- onlyoffice-rabbitmq
environment:
- ONLYOFFICE_DATA_CONTAINER_HOST=onlyoffice-documentserver-data
- BALANCE=uri depth 3
- EXCLUDE_PORTS=443
- HTTP_CHECK=GET /healthcheck
- EXTRA_SETTINGS=http-check expect string true
# Uncomment the string below to redirect HTTP request to HTTPS request.
#- FORCE_SSL=true
stdin_open: true
restart: always
expose:
- '80'
volumes_from:
- onlyoffice-documentserver-data
onlyoffice-haproxy:
container_name: onlyoffice-haproxy
image: dockercloud/haproxy:1.5.1
depends_on:
- onlyoffice-documentserver
environment:
- MODE=http
# Uncomment the string below to specify the path of ssl certificates
#- CERT_FOLDER=/certs/
stdin_open: true
links:
- onlyoffice-documentserver
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Uncomment the string below to map a ssl certificate from host
# to the proxy container
#- /app/onlyoffice/DocumentServer/data/certs/onlyoffice.pem:/certs/cert1.pem
restart: always
ports:
- '80:80'
- '443:443'
- '1936:1936'
onlyoffice-redis:
container_name: onlyoffice-redis
image: redis
restart: always
expose:
- '6379'
onlyoffice-rabbitmq:
container_name: onlyoffice-rabbitmq
image: rabbitmq
restart: always
expose:
- '5672'
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:9.5
environment:
- POSTGRES_DB=onlyoffice
- POSTGRES_USER=onlyoffice
- POSTGRES_HOST_AUTH_METHOD=trust
restart: always
expose:
- '5432'
volumes:
- postgresql_data:/var/lib/postgresql
volumes:
postgresql_data:

View File

@ -0,0 +1,13 @@
[program:adminpanel]
command=/var/www/COMPANY_NAME/documentserver/server/AdminPanel/server/adminpanel
directory=/var/www/COMPANY_NAME/documentserver/server/AdminPanel
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/adminpanel/out.log
stdout_logfile_backups=0
stdout_logfile_maxbytes=0
stderr_logfile=/var/log/COMPANY_NAME/documentserver/adminpanel/err.log
stderr_logfile_backups=0
stderr_logfile_maxbytes=0
autostart=false
autorestart=false

View File

@ -2,7 +2,7 @@
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
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=COMPANY_NAME,LD_LIBRARY_PATH=/var/www/COMPANY_NAME/documentserver/server/FileConverter/bin
stdout_logfile=/var/log/COMPANY_NAME/documentserver/converter/out.log
stdout_logfile_backups=0
stdout_logfile_maxbytes=0

View File

@ -2,7 +2,7 @@
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
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1,PKG_NATIVE_CACHE_PATH=/tmp/.cache,APPLICATION_NAME=COMPANY_NAME
stdout_logfile=/var/log/COMPANY_NAME/documentserver/docservice/out.log
stdout_logfile_backups=0
stdout_logfile_maxbytes=0

View File

@ -1,2 +1,2 @@
[group:ds]
programs=docservice,converter,metrics,example
programs=docservice,converter,metrics,example,adminpanel

View File

@ -68,6 +68,10 @@ variable "BASE_VERSION" {
default = ""
}
variable "PACKAGE_SUFFIX" {
default = ""
}
variable "PG_VERSION" {
default = ""
}
@ -106,8 +110,7 @@ target "documentserver-stable" {
tags = ["docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTER_TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTEST_TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest",
equal("-ee",PRODUCT_EDITION) ? "docker.io/${COMPANY_NAME}4enterprise/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}": "",]
equal("true",LATEST) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",]
platforms = ["linux/amd64", "linux/arm64"]
args = {
"PULL_TAG": "${PULL_TAG}"
@ -130,6 +133,7 @@ target "documentserver-ucs" {
"COMPANY_NAME": "${COMPANY_NAME}"
"PACKAGE_VERSION": "${PACKAGE_VERSION}"
"PACKAGE_BASEURL": "${PACKAGE_BASEURL}"
"PACKAGE_SUFFIX": "${PACKAGE_SUFFIX}"
"BASE_VERSION": "${BASE_VERSION}"
"PG_VERSION": "${PG_VERSION}"
}

View File

@ -2,6 +2,7 @@ services:
onlyoffice-documentserver:
build:
context: .
image: onlyoffice/documentserver #[-de,-ee]
container_name: onlyoffice-documentserver
depends_on:
- onlyoffice-postgresql
@ -21,6 +22,12 @@ services:
ports:
- '80:80'
- '443:443'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/info/info.json"]
interval: 30s
retries: 5
start_period: 60s
timeout: 10s
stdin_open: true
restart: always
stop_grace_period: 60s
@ -33,14 +40,20 @@ services:
onlyoffice-rabbitmq:
container_name: onlyoffice-rabbitmq
image: rabbitmq
image: rabbitmq:3
restart: always
expose:
- '5672'
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "status"]
interval: 10s
retries: 3
start_period: 10s
timeout: 10s
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:12
image: postgres:15
environment:
- POSTGRES_DB=onlyoffice
- POSTGRES_USER=onlyoffice
@ -50,6 +63,12 @@ services:
- '5432'
volumes:
- postgresql_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U onlyoffice"]
interval: 10s
retries: 3
start_period: 10s
timeout: 10s
volumes:
postgresql_data:

0
fonts/.placeholder Normal file
View File

View File

@ -32,6 +32,7 @@ DS_LIB_DIR="${LIB_DIR}/documentserver"
CONF_DIR="/etc/${COMPANY_NAME}/documentserver"
SUPERVISOR_CONF_DIR="/etc/supervisor/conf.d"
IS_UPGRADE="false"
PLUGINS_ENABLED=${PLUGINS_ENABLED:-true}
ONLYOFFICE_DATA_CONTAINER=${ONLYOFFICE_DATA_CONTAINER:-false}
ONLYOFFICE_DATA_CONTAINER_HOST=${ONLYOFFICE_DATA_CONTAINER_HOST:-localhost}
@ -50,12 +51,11 @@ if [ "${RELEASE_DATE}" != "${PREV_RELEASE_DATE}" ]; then
fi
fi
SSL_CERTIFICATES_DIR="/usr/share/ca-certificates/ds"
mkdir -p ${SSL_CERTIFICATES_DIR}
if [[ -d ${DATA_DIR}/certs ]] && [ -e ${DATA_DIR}/certs/*.crt ]; then
cp -f ${DATA_DIR}/certs/* ${SSL_CERTIFICATES_DIR}
chmod 644 ${SSL_CERTIFICATES_DIR}/*.crt ${SSL_CERTIFICATES_DIR}/*.pem
chmod 400 ${SSL_CERTIFICATES_DIR}/*.key
SSL_CERTIFICATES_DIR="/usr/share/ca-certificates/ds"; mkdir -p ${SSL_CERTIFICATES_DIR}
find "${DATA_DIR}/certs" -type f \( -iname '*.crt' -o -iname '*.pem' -o -iname '*.key' \) -exec cp -f {} "${SSL_CERTIFICATES_DIR}"/ \;
if find "${SSL_CERTIFICATES_DIR}" -maxdepth 1 -type f | read _; then
find "${SSL_CERTIFICATES_DIR}" -type f \( -iname '*.crt' -o -iname '*.pem' \) -exec chmod 644 {} \;
find "${SSL_CERTIFICATES_DIR}" -type f -iname '*.key' -exec chmod 400 {} \;
fi
if [[ -z $SSL_CERTIFICATE_PATH ]] && [[ -f ${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.crt ]]; then
@ -84,7 +84,7 @@ elif [[ -f ${SSL_CERTIFICATE_PATH} ]]; then
fi
if [[ -n $NODE_EXTRA_ENVIRONMENT ]]; then
sed -i "s|^environment=.*$|&,NODE_EXTRA_CA_CERTS=${NODE_EXTRA_ENVIRONMENT}|" /etc/supervisor/conf.d/*.conf
sed -i "s|^environment=.*$|&,NODE_EXTRA_CA_CERTS=${NODE_EXTRA_ENVIRONMENT}|" ${SUPERVISOR_CONF_DIR}/*.conf
fi
CA_CERTIFICATES_PATH=${CA_CERTIFICATES_PATH:-${SSL_CERTIFICATES_DIR}/ca-certificates.pem}
@ -103,14 +103,15 @@ 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_ACCESS_LOG=${NGINX_ACCESS_LOG:-false}
# Limiting the maximum number of simultaneous connections due to possible memory shortage
LIMIT=$(ulimit -n); [ $LIMIT -gt 1048576 ] && LIMIT=1048576
LIMIT=$(ulimit -n); [ "$LIMIT" = "unlimited" ] || [ "$LIMIT" -gt 524288 ] && LIMIT=524288
NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$LIMIT}
RABBIT_CONNECTIONS=${RABBIT_CONNECTIONS:-$LIMIT}
JWT_ENABLED=${JWT_ENABLED:-true}
# validate user's vars before usinig in json
# validate user's vars before using in json
if [ "${JWT_ENABLED}" == "true" ]; then
JWT_ENABLED="true"
else
@ -273,8 +274,7 @@ waiting_for_connection(){
waiting_for_db_ready(){
case $DB_TYPE in
"oracle")
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/${DB_NAME}"
DB_TEST="echo \"SELECT version FROM V\$INSTANCE;\" | $ORACLE_SQL 2>/dev/null | grep \"Connected\" | wc -l"
;;
*)
@ -375,10 +375,11 @@ update_redis_settings(){
${JSON} -I -e "this.services.CoAuthoring.redis.host = '${REDIS_SERVER_HOST}'"
${JSON} -I -e "this.services.CoAuthoring.redis.port = '${REDIS_SERVER_PORT}'"
if [ -n "${REDIS_SERVER_PASS}" ]; then
${JSON} -I -e "this.services.CoAuthoring.redis.options = {'password':'${REDIS_SERVER_PASS}'}"
fi
${JSON} -I -e "this.services.CoAuthoring.redis.options = {
${REDIS_SERVER_USER:+username: '${REDIS_SERVER_USER}',}
${REDIS_SERVER_PASS:+password: '${REDIS_SERVER_PASS}',}
${REDIS_SERVER_DB:+database: '${REDIS_SERVER_DB}',}
}"
}
update_ds_settings(){
@ -389,6 +390,7 @@ update_ds_settings(){
${JSON} -I -e "this.services.CoAuthoring.secret.inbox.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.outbox.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.session.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.browser.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.token.inbox.header = '${JWT_HEADER}'"
${JSON} -I -e "this.services.CoAuthoring.token.outbox.header = '${JWT_HEADER}'"
@ -450,9 +452,7 @@ create_postgresql_db(){
}
create_mssql_db(){
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT"
$MSSQL -U $DB_USER -P "$DB_PWD" -C -Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = '$DB_NAME') BEGIN CREATE DATABASE $DB_NAME; END"
${MSSQL/ -d $DB_NAME/} -b -Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = '$DB_NAME') BEGIN CREATE DATABASE [$DB_NAME]; END"
}
create_db_tbl() {
@ -489,6 +489,22 @@ upgrade_db_tbl() {
esac
}
postgresql_check_schema(){
DB_SCHEMA=${DB_SCHEMA:-$(${JSON} services.CoAuthoring.sql.pgPoolExtraOptions.options 2>/dev/null | sed -n 's/.*search_path=\([^, ]*\).*/\1/p')}
if [ -n "${DB_SCHEMA}" ]; then
export PGOPTIONS="-c search_path=${DB_SCHEMA}"
$PSQL -c "CREATE SCHEMA IF NOT EXISTS ${DB_SCHEMA};" >/dev/null 2>&1
${JSON} -I -e "this.services.CoAuthoring.sql.pgPoolExtraOptions ||= {}; this.services.CoAuthoring.sql.pgPoolExtraOptions.options = '${PGOPTIONS}'"
fi
}
mssql_check_schema(){
if [ -n "${DB_SCHEMA}" ]; then
${MSSQL} -b -Q "DECLARE @s sysname=N'${DB_SCHEMA}'; IF SCHEMA_ID(@s) IS NULL BEGIN DECLARE @sql nvarchar(max); SET @sql=N'CREATE SCHEMA '+QUOTENAME(@s)+N' AUTHORIZATION '+QUOTENAME(N'${DB_USER}'); EXEC(@sql); END"
${MSSQL} -b -Q "DECLARE @s sysname=N'${DB_SCHEMA}'; DECLARE @u sysname=N'${DB_USER}'; IF USER_ID(@u) IS NOT NULL BEGIN DECLARE @sql nvarchar(max); SET @sql=N'ALTER USER '+QUOTENAME(@u)+N' WITH DEFAULT_SCHEMA = '+QUOTENAME(@s); EXEC(@sql); END"
fi
}
upgrade_postgresql_tbl() {
if [ -n "$DB_PWD" ]; then
export PGPASSWORD=$DB_PWD
@ -496,6 +512,7 @@ upgrade_postgresql_tbl() {
PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w"
postgresql_check_schema
$PSQL -f "$APP_DIR/server/schema/postgresql/removetbl.sql"
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
}
@ -509,16 +526,19 @@ upgrade_mysql_tbl() {
}
upgrade_mssql_tbl() {
CONN_PARAMS="-U $DB_USER -P "$DB_PWD" -C"
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT $CONN_PARAMS"
if [ -n "$DB_PWD" ]; then
export SQLCMDPASSWORD=$DB_PWD
fi
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT -d $DB_NAME -U $DB_USER -C"
mssql_check_schema
$MSSQL < "$APP_DIR/server/schema/mssql/removetbl.sql" >/dev/null 2>&1
$MSSQL < "$APP_DIR/server/schema/mssql/createdb.sql" >/dev/null 2>&1
}
upgrade_oracle_tbl() {
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/${DB_NAME}"
$ORACLE_SQL @$APP_DIR/server/schema/oracle/removetbl.sql >/dev/null 2>&1
$ORACLE_SQL @$APP_DIR/server/schema/oracle/createdb.sql >/dev/null 2>&1
@ -530,6 +550,8 @@ create_postgresql_tbl() {
fi
PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w"
postgresql_check_schema
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
}
@ -544,17 +566,19 @@ create_mysql_tbl() {
}
create_mssql_tbl() {
if [ -n "$DB_PWD" ]; then
export SQLCMDPASSWORD=$DB_PWD
fi
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT -d $DB_NAME -U $DB_USER -C"
create_mssql_db
CONN_PARAMS="-U $DB_USER -P "$DB_PWD" -C"
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT $CONN_PARAMS"
mssql_check_schema
$MSSQL < "$APP_DIR/server/schema/mssql/createdb.sql" >/dev/null 2>&1
}
create_oracle_tbl() {
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/${DB_NAME}"
$ORACLE_SQL @$APP_DIR/server/schema/oracle/createdb.sql >/dev/null 2>&1
}
@ -581,7 +605,13 @@ update_nginx_settings(){
# Set up nginx
sed 's/^worker_processes.*/'"worker_processes ${NGINX_WORKER_PROCESSES};"'/' -i ${NGINX_CONFIG_PATH}
sed 's/worker_connections.*/'"worker_connections ${NGINX_WORKER_CONNECTIONS};"'/' -i ${NGINX_CONFIG_PATH}
sed 's/access_log.*/'"access_log off;"'/' -i ${NGINX_CONFIG_PATH}
if [ "${NGINX_ACCESS_LOG}" = "true" ]; then
touch "${DS_LOG_DIR}/nginx.access.log"
sed -ri 's|^\s*access_log\b.*;|access_log '"${DS_LOG_DIR}"'/nginx.access.log;|' "${NGINX_CONFIG_PATH}" "${NGINX_ONLYOFFICE_PATH}/includes/ds-common.conf" 2>/dev/null
else
sed -ri 's|^\s*access_log\b.*;|access_log off;|' "${NGINX_CONFIG_PATH}"
fi
# setup HTTPS
if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then
@ -642,11 +672,11 @@ update_release_date(){
}
# create base folders
for i in converter docservice metrics; do
mkdir -p "${DS_LOG_DIR}/$i"
for i in converter docservice metrics adminpanel; do
mkdir -p "$DS_LOG_DIR/$i" && touch "$DS_LOG_DIR/$i"/{out,err}.log
done
mkdir -p ${DS_LOG_DIR}-example
mkdir -p "${DS_LOG_DIR}-example" && touch "${DS_LOG_DIR}-example"/{out,err}.log
# create app folders
for i in ${DS_LIB_DIR}/App_Data/cache/files ${DS_LIB_DIR}/App_Data/docbuilder ${DS_LIB_DIR}-example/files; do
@ -654,11 +684,16 @@ for i in ${DS_LIB_DIR}/App_Data/cache/files ${DS_LIB_DIR}/App_Data/docbuilder ${
done
# change folder rights
chown ds:ds "${DATA_DIR}"
for i in ${DS_LOG_DIR} ${DS_LOG_DIR}-example ${LIB_DIR}; do
chown -R ds:ds "$i"
chmod -R 755 "$i"
done
# Bug 75324 - Update permissions for runtime.json
AI_CONFIG_FILE="${DATA_DIR}/runtime.json"
[ -f "${AI_CONFIG_FILE}" ] && { chown ds:ds "${AI_CONFIG_FILE}" && chmod 644 "${AI_CONFIG_FILE}"; }
if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
read_setting
@ -701,7 +736,8 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
chmod 400 ${RABBITMQ_DATA}/.erlang.cookie
fi
echo "ulimit -n $RABBIT_CONNECTIONS" >> /etc/default/rabbitmq-server
sed -i '/^[[:space:]]*ulimit[[:space:]]\+-n[[:space:]]\+/d' /etc/default/rabbitmq-server
printf 'ulimit -n %s\n' "${RABBIT_CONNECTIONS}" >> /etc/default/rabbitmq-server
LOCAL_SERVICES+=("rabbitmq-server")
# allow Rabbitmq startup after container kill
@ -724,7 +760,7 @@ else
waiting_for_datacontainer
# read settings after the data container in ready state
# to prevent get unconfigureted data
# to prevent get unconfigured data
read_setting
update_welcome_page
@ -737,7 +773,8 @@ for i in ${LOCAL_SERVICES[@]}; do
service $i start
done
if [ ${PG_NEW_CLUSTER} = "true" ]; then
PG_DB_EXISTS=$(PGPASSWORD="$DB_PWD" psql -h ${DB_HOST} -p${DB_PORT} -U "${DB_USER}" -tAc "SELECT 1 FROM pg_database WHERE datname='${DB_NAME}';" 2>/dev/null)
if [ ${PG_NEW_CLUSTER} = "true" ] || [ "${PG_DB_EXISTS}" != "1" ]; then
create_postgresql_db
create_postgresql_tbl
fi
@ -756,6 +793,12 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
update_nginx_settings
if [ "${PLUGINS_ENABLED}" = "true" ]; then
( documentserver-pluginsmanager.sh -r false --update="${APP_DIR}/sdkjs-plugins/plugin-list-default.json" >/dev/null; echo "[pluginsmanager] Plugins initialization finished" >/proc/1/fd/1 ) &
fi
[ "${ADMINPANEL_ENABLED:-false}" = "true" ] && sed -i 's,autostart=false,autostart=true,' ${SUPERVISOR_CONF_DIR}/ds-adminpanel.conf
[ "${EXAMPLE_ENABLED:-false}" = "true" ] && sed -i 's,autostart=false,autostart=true,' ${SUPERVISOR_CONF_DIR}/ds-example.conf
service supervisor start
# start cron to enable log rotating
@ -763,6 +806,9 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
service cron start
fi
# Fix to resolve the `unknown "cache_tag" variable` error
start_process documentserver-flush-cache.sh -r false
# nginx used as a proxy, and as data container status service.
# it run in all cases.
service nginx start
@ -777,8 +823,9 @@ fi
if [ "${GENERATE_FONTS}" == "true" ]; then
start_process documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER}
fi
start_process documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}
echo "${JWT_MESSAGE}"
start_process tail -f /var/log/${COMPANY_NAME}/**/*.log
start_process bash -c "find '$DS_LOG_DIR' '$DS_LOG_DIR-example' -type f -name '*.log' | xargs tail -F"

3
tests/README.md Normal file
View File

@ -0,0 +1,3 @@
The files in this folder are intended for use in integration auto-tests.
All credentials are strictly for testing purposes only.

View File

@ -32,6 +32,14 @@ wait_dm_ready
EOF
COPY <<"EOF" /permissions.sql
CREATE SYNONYM onlyoffice.DOC_CHANGES FOR sysdba.DOC_CHANGES;
CREATE SYNONYM onlyoffice.TASK_RESULT FOR sysdba.TASK_RESULT;
GRANT ALL PRIVILEGES ON sysdba.DOC_CHANGES TO onlyoffice;
GRANT ALL PRIVILEGES ON sysdba.TASK_RESULT TO onlyoffice;
EOF
RUN bash /opt/startup.sh > /dev/null 2>&1 \
& mkdir -p /schema/damengdb \
@ -41,6 +49,9 @@ RUN bash /opt/startup.sh > /dev/null 2>&1 \
&& cd ${DISQL_BIN} \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e \
"create user "onlyoffice" identified by "onlyoffice" password_policy 0;" \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e \
"GRANT SELECT ON DBA_TAB_COLUMNS TO onlyoffice;" \
&& echo "EXIT" | tee -a /schema/dameng/createdb.sql \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`/schema/dameng/createdb.sql \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`/permissions.sql \
&& sleep 10