From 48e6d62663ed425bdddfa8732301019788b3352a Mon Sep 17 00:00:00 2001 From: Hendrik Leidinger Date: Tue, 26 May 2026 11:17:14 -0700 Subject: [PATCH 1/4] feat: rebranding, possibility for own brand Signed-off-by: Hendrik Leidinger --- build/.docker/bundle.bake.Dockerfile | 15 +++++++ build/.docker/packages.bake.Dockerfile | 14 +++++- build/.docker/standalone.bake.Dockerfile | 32 +++++++------ .../standalone/supervisor/ds-adminpanel.conf | 10 ++--- .../standalone/supervisor/ds-converter.conf | 10 ++--- .../standalone/supervisor/ds-docservice.conf | 10 ++--- .../standalone/supervisor/ds-example.conf | 10 ++--- .../standalone/supervisor/ds-metrics.conf | 10 ++--- build/docker-bake.hcl | 45 ++++++++++++++++--- build/scripts/standalone/entrypoint.sh | 16 +++---- document-server-integration | 2 +- server | 2 +- 12 files changed, 119 insertions(+), 57 deletions(-) diff --git a/build/.docker/bundle.bake.Dockerfile b/build/.docker/bundle.bake.Dockerfile index 52d23f883b..5f42807d38 100644 --- a/build/.docker/bundle.bake.Dockerfile +++ b/build/.docker/bundle.bake.Dockerfile @@ -14,6 +14,11 @@ FROM alpine AS bundle ARG BUILD_ROOT=/package + ARG PRODUCT_NAME_LOW + ARG COMPANY_NAME_LOW + + ENV PRODUCT_NAME_LOW=${PRODUCT_NAME_LOW} + ENV COMPANY_NAME_LOW=${COMPANY_NAME_LOW} # --- Copy build files RUN mkdir -p /build/documentserver/sdkjs-plugins /build/documentserver/fonts \ /build/documentserver/server/FileConverter/lib /build/documentserver/server/tools @@ -48,6 +53,11 @@ FROM alpine AS bundle RUN mkdir -p /build/documentserver-example/files COPY --from=example /example/config /build/documentserver-example/config + RUN find /build/documentserver-example/config/ -type f -name '*.json' \ + -exec sed -i "s/euro-office/${COMPANY_NAME_LOW}/g" {} + + RUN find /build/documentserver-example/config/ -type f -name '*.json' \ + -exec sed -i "s/documentserver/${PRODUCT_NAME_LOW}/g" {} + + #COPY document-server-package/common/documentserver-example/welcome /build/documentserver-example/welcome #RUN YEAR=$(date +"%Y") && \ # sed -i "s|{{OFFICIAL_PRODUCT_NAME}}|Community Edition|g" /build/documentserver-example/welcome/*.html && \ @@ -67,6 +77,11 @@ FROM alpine AS bundle COPY server/Common/config/. /build/documentserver/server/Common/config/ + RUN find /build/documentserver/server/Common/config/ -type f -name '*.json' \ + -exec sed -i "s/euro-office/${COMPANY_NAME_LOW}/g" {} + + RUN find /build/documentserver/server/Common/config/ -type f -name '*.json' \ + -exec sed -i "s/documentserver/${PRODUCT_NAME_LOW}/g" {} + + RUN rm -f /build/documentserver/server/Common/config/runtime.json COPY server/schema/. /build/documentserver/server/schema/ diff --git a/build/.docker/packages.bake.Dockerfile b/build/.docker/packages.bake.Dockerfile index 63dd5ec30f..ed91dce607 100644 --- a/build/.docker/packages.bake.Dockerfile +++ b/build/.docker/packages.bake.Dockerfile @@ -11,14 +11,20 @@ FROM ubuntu:24.04 AS package + ARG COMPANY_NAME + ARG COMPANY_NAME_LOW + ARG PRODUCT_NAME + ARG BRANDING_DIR ARG PRODUCT_VERSION ARG BUILD_NUMBER=0 ARG OUT_BASE="/build/package/out" ARG BUNDLE_BASE="/build/bundle" - ARG OUT_DIR="${BUNDLE_BASE}/euro-office/documentserver" - ARG EXAMPLE_OUT="${BUNDLE_BASE}/euro-office/documentserver-example" + ARG OUT_DIR="${BUNDLE_BASE}/${COMPANY_NAME_LOW}/documentserver" + ARG EXAMPLE_OUT="${BUNDLE_BASE}/${COMPANY_NAME_LOW}/documentserver-example" ENV PRODUCT_VERSION=${PRODUCT_VERSION} + ENV COMPANY_NAME=${COMPANY_NAME} + ENV PRODUCT_NAME=${PRODUCT_NAME} ENV BUILD_NUMBER=${BUILD_NUMBER} ENV OUT_BASE=${OUT_BASE} ENV BUNDLE_BASE=${BUNDLE_BASE} @@ -41,11 +47,15 @@ FROM ubuntu:24.04 AS package # Upstream packaging repo COPY document-server-package/ /document-server-package/ + ### Branding + COPY ${BRANDING_DIR}/document-server-package/ /document-server-package/ + RUN cd document-server-package && \ mkdir -p ${OUT_BASE} && \ ln -s ${BUNDLE_BASE} ${OUT_BASE}/linux_64 && \ ln -s ${BUNDLE_BASE} ${OUT_BASE}/linux_arm64 && \ make deb rpm \ + BRANDING_DIR="." \ BUILD_OUTPUT_DIR="${OUT_BASE}" \ PRODUCT_VERSION="${PRODUCT_VERSION}" \ BUILD_NUMBER="${BUILD_NUMBER}" diff --git a/build/.docker/standalone.bake.Dockerfile b/build/.docker/standalone.bake.Dockerfile index b64cc9a886..866a9d3fac 100644 --- a/build/.docker/standalone.bake.Dockerfile +++ b/build/.docker/standalone.bake.Dockerfile @@ -10,15 +10,21 @@ #### FINAL UBUNTU #### FROM ubuntu:24.04 AS finalubuntu ARG PRODUCT_VERSION +ARG BUILD_NUMBER ARG BUILD_ROOT=/package -ARG EO_ROOT=/var/www/euro-office/documentserver -ARG EO_LOG=/var/log/euro-office/documentserver -ARG EO_CONF=/etc/euro-office/documentserver +ARG COMPANY_NAME_LOW +ARG PRODUCT_NAME_LOW + +ARG EO_ROOT=/var/www/${COMPANY_NAME_LOW}/${PRODUCT_NAME_LOW} +ARG EO_LOG=/var/log/${COMPANY_NAME_LOW}/${PRODUCT_NAME_LOW} +ARG EO_CONF=/etc/${COMPANY_NAME_LOW}/${PRODUCT_NAME_LOW} ENV EO_ROOT=${EO_ROOT} ENV EO_LOG=${EO_LOG} ENV EO_CONF=${EO_CONF} +ENV COMPANY_NAME_LOW=${COMPANY_NAME_LOW} +ENV PRODUCT_NAME_LOW=${PRODUCT_NAME_LOW} RUN apt-get -y update && \ ACCEPT_EULA=Y apt-get -yq install \ @@ -29,7 +35,7 @@ RUN apt-get -y update && \ # Create the 'ds' user that is required by OnlyOffice scripts #RUN useradd -r -s /bin/false ds || true -# --- install euro-office .deb package +# --- install ${COMPANY_NAME_LOW} .deb package ARG TARGETARCH COPY --from=packages / /tmp/ RUN apt-get -y update && \ @@ -37,13 +43,13 @@ RUN apt-get -y update && \ service rabbitmq-server start && \ sudo -u postgres psql -c "CREATE USER eurooffice WITH password 'eurooffice';" && \ sudo -u postgres psql -c "CREATE DATABASE eurooffice OWNER eurooffice;" && \ - echo "euro-office-documentserver ds/db-type string postgres" | debconf-set-selections && \ - echo "euro-office-documentserver ds/db-host string localhost" | debconf-set-selections && \ - echo "euro-office-documentserver ds/db-port string 5432" | debconf-set-selections && \ - echo "euro-office-documentserver ds/db-user string eurooffice" | debconf-set-selections && \ - echo "euro-office-documentserver ds/db-pwd password eurooffice" | debconf-set-selections && \ - echo "euro-office-documentserver ds/db-name string eurooffice" | debconf-set-selections && \ - DS_DOCKER_INSTALLATION=true DEBIAN_FRONTEND=noninteractive apt-get -yq install /tmp/euro-office-documentserver_${PRODUCT_VERSION}-0_${TARGETARCH}.deb + echo "${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW} ds/db-type string postgres" | debconf-set-selections && \ + echo "${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW} ds/db-host string localhost" | debconf-set-selections && \ + echo "${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW} ds/db-port string 5432" | debconf-set-selections && \ + echo "${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW} ds/db-user string eurooffice" | debconf-set-selections && \ + echo "${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW} ds/db-pwd password eurooffice" | debconf-set-selections && \ + echo "${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW} ds/db-name string eurooffice" | debconf-set-selections && \ + DS_DOCKER_INSTALLATION=true DEBIAN_FRONTEND=noninteractive apt-get -yq install /tmp/${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW}_${PRODUCT_VERSION}-${BUILD_NUMBER}_${TARGETARCH}.deb #sudo -u postgres bash -c "PGPASSWORD=eurooffice psql -h localhost -U eurooffice -d eurooffice -f ${EO_ROOT}/server/schema/postgresql/createdb.sql" @@ -59,8 +65,8 @@ COPY --chmod=755 build/scripts/standalone/entrypoint.sh /entrypoint.sh #RUN mkdir -p ${EO_ROOT}/server/Common/config && \ # echo '{}' > ${EO_ROOT}/server/Common/config/runtime.json -#RUN mkdir -p /var/lib/euro-office #&& \ -# chown -R ds:ds /var/www/euro-office /var/lib/euro-office /var/log/euro-office +#RUN mkdir -p /var/lib/${COMPANY_NAME_LOW} #&& \ +# chown -R ds:ds /var/www/${COMPANY_NAME_LOW} /var/lib/${COMPANY_NAME_LOW} /var/log/${COMPANY_NAME_LOW} RUN /usr/bin/documentserver-flush-cache.sh -r false diff --git a/build/configs/standalone/supervisor/ds-adminpanel.conf b/build/configs/standalone/supervisor/ds-adminpanel.conf index f8ee8f142c..e0ce7ceb35 100644 --- a/build/configs/standalone/supervisor/ds-adminpanel.conf +++ b/build/configs/standalone/supervisor/ds-adminpanel.conf @@ -1,12 +1,12 @@ [program:adminpanel] -command=/var/www/euro-office/documentserver/server/AdminPanel/server/adminpanel -directory=/var/www/euro-office/documentserver/server/AdminPanel +command=%(ENV_EO_ROOT)s/server/AdminPanel/server/adminpanel +directory=%(ENV_EO_ROOT)s/server/AdminPanel user=ds -environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/euro-office/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice,LD_LIBRARY_PATH=/var/www/euro-office/documentserver/server/FileConverter/bin:/var/www/euro-office/documentserver/server/FileConverter/lib -stdout_logfile=/var/log/euro-office/documentserver/adminpanel/out.log +environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=%(ENV_EO_CONF)s,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice,LD_LIBRARY_PATH=%(ENV_EO_ROOT)s/server/FileConverter/bin:%(ENV_EO_ROOT)s/server/FileConverter/lib +stdout_logfile=%(ENV_EO_LOG)s/adminpanel/out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/euro-office/documentserver/adminpanel/err.log +stderr_logfile=%(ENV_EO_LOG)s/adminpanel/err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=false diff --git a/build/configs/standalone/supervisor/ds-converter.conf b/build/configs/standalone/supervisor/ds-converter.conf index 3816aedf30..0e7e29e4fd 100644 --- a/build/configs/standalone/supervisor/ds-converter.conf +++ b/build/configs/standalone/supervisor/ds-converter.conf @@ -1,12 +1,12 @@ [program:converter] -command=/var/www/euro-office/documentserver/server/FileConverter/converter -directory=/var/www/euro-office/documentserver/server/FileConverter +command=%(ENV_EO_ROOT)s/server/FileConverter/converter +directory=%(ENV_EO_ROOT)s/server/FileConverter user=ds -environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/euro-office/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice,LD_LIBRARY_PATH=/var/www/euro-office/documentserver/server/FileConverter/bin:/var/www/euro-office/documentserver/server/FileConverter/lib -stdout_logfile=/var/log/euro-office/documentserver/converter/out.log +environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=%(ENV_EO_CONF)s,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice,LD_LIBRARY_PATH=%(ENV_EO_ROOT)s/server/FileConverter/bin:%(ENV_EO_ROOT)s/server/FileConverter/lib +stdout_logfile=%(ENV_EO_LOG)s/converter/out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/euro-office/documentserver/converter/err.log +stderr_logfile=%(ENV_EO_LOG)s/converter/err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=true diff --git a/build/configs/standalone/supervisor/ds-docservice.conf b/build/configs/standalone/supervisor/ds-docservice.conf index 6ce15d40ea..62ed4d426a 100644 --- a/build/configs/standalone/supervisor/ds-docservice.conf +++ b/build/configs/standalone/supervisor/ds-docservice.conf @@ -1,12 +1,12 @@ [program:docservice] -command=/var/www/euro-office/documentserver/server/DocService/docservice -directory=/var/www/euro-office/documentserver/server/DocService +command=%(ENV_EO_ROOT)s/server/DocService/docservice +directory=%(ENV_EO_ROOT)s/server/DocService user=ds -environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/euro-office/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice,LD_LIBRARY_PATH=/var/www/euro-office/documentserver/server/FileConverter/bin:/var/www/euro-office/documentserver/server/FileConverter/lib -stdout_logfile=/var/log/euro-office/documentserver/docservice/out.log +environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=%(ENV_EO_CONF)s,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice,LD_LIBRARY_PATH=%(ENV_EO_ROOT)s/server/FileConverter/bin:%(ENV_EO_ROOT)s/server/FileConverter/lib +stdout_logfile=%(ENV_EO_LOG)s/docservice/out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/euro-office/documentserver/docservice/err.log +stderr_logfile=%(ENV_EO_LOG)s/docservice/err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=true diff --git a/build/configs/standalone/supervisor/ds-example.conf b/build/configs/standalone/supervisor/ds-example.conf index 3a03ea9c3e..5f8c1985c5 100644 --- a/build/configs/standalone/supervisor/ds-example.conf +++ b/build/configs/standalone/supervisor/ds-example.conf @@ -1,12 +1,12 @@ [program:ds-example] -command=/var/www/euro-office/documentserver-example/example -directory=/var/www/euro-office/documentserver-example/ +command=%(ENV_EO_ROOT)s-example/example +directory=%(ENV_EO_ROOT)s-example/ user=ds -environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/euro-office/documentserver-example,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice -stdout_logfile=/var/log/euro-office/documentserver/ds-example_out.log +environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=%(ENV_EO_CONF)s-example,NODE_DISABLE_COLORS=1,APPLICATION_NAME=onlyoffice +stdout_logfile=%(ENV_EO_LOG)s/ds-example_out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/euro-office/documentserver/ds-example_err.log +stderr_logfile=%(ENV_EO_LOG)s/ds-example_err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=false diff --git a/build/configs/standalone/supervisor/ds-metrics.conf b/build/configs/standalone/supervisor/ds-metrics.conf index fe18341c40..13e30c9dbb 100644 --- a/build/configs/standalone/supervisor/ds-metrics.conf +++ b/build/configs/standalone/supervisor/ds-metrics.conf @@ -1,12 +1,12 @@ [program:metrics] -command=/var/www/euro-office/documentserver/server/Metrics/metrics ./config/config.js -directory=/var/www/euro-office/documentserver/server/Metrics +command=%(ENV_EO_ROOT)s/server/Metrics/metrics ./config/config.js +directory=%(ENV_EO_ROOT)s/server/Metrics user=ds -environment=NODE_DISABLE_COLORS=1,LD_LIBRARY_PATH=/var/www/euro-office/documentserver/server/FileConverter/bin:/var/www/euro-office/documentserver/server/FileConverter/lib -stdout_logfile=/var/log/euro-office/documentserver/metrics/out.log +environment=NODE_DISABLE_COLORS=1,LD_LIBRARY_PATH=%(ENV_EO_ROOT)s/server/FileConverter/bin:%(ENV_EO_ROOT)s/server/FileConverter/lib +stdout_logfile=%(ENV_EO_LOG)s/metrics/out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/euro-office/documentserver/metrics/err.log +stderr_logfile=%(ENV_EO_LOG)s/metrics/err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=true diff --git a/build/docker-bake.hcl b/build/docker-bake.hcl index 2b694ffc8d..3ece6b61db 100644 --- a/build/docker-bake.hcl +++ b/build/docker-bake.hcl @@ -1,7 +1,28 @@ # docker-bake.hcl + +variable "BRANDING_DIR" { + default = "." +} + +variable "COMPANY_NAME" { + default = "Euro-Office" +} + +variable "COMPANY_NAME_LOW" { + default = regex_replace(lower(COMPANY_NAME), "\\s+", "-") +} + +variable "PRODUCT_NAME" { + default = "DocumentServer" +} + +variable "PRODUCT_NAME_LOW" { + default = regex_replace(lower(PRODUCT_NAME), "\\s+", "-") +} + variable "REGISTRY" { - default = "ghcr.io/euro-office" + default = "ghcr.io/${COMPANY_NAME_LOW}" } variable "TAG" { @@ -12,6 +33,10 @@ variable "PRODUCT_VERSION" { default = "9.3.1" } +variable "BUILD_NUMBER" { + default = "0" +} + variable "DS_VERSION_HASH" { default = "dev001" } @@ -62,12 +87,18 @@ group "develop" { target "_common" { args = { - PRODUCT_VERSION = "${PRODUCT_VERSION}" - DS_VERSION_HASH = "${DS_VERSION_HASH}" - BUILD_ROOT = "${BUILD_ROOT}" - NUGET_CACHE = "${NUGET_CACHE}" - CACHE_BUST = "${CACHE_BUST}" - PACKAGE_BASE = "${PACKAGE_BASE}" + PRODUCT_VERSION = "${PRODUCT_VERSION}" + BUILD_NUMBER = "${BUILD_NUMBER}" + BUILD_ROOT = "${BUILD_ROOT}" + DS_VERSION_HASH = "${DS_VERSION_HASH}" + NUGET_CACHE = "${NUGET_CACHE}" + CACHE_BUST = "${CACHE_BUST}" + PACKAGE_BASE = "${PACKAGE_BASE}" + BRANDING_DIR = "${BRANDING_DIR}" + PRODUCT_NAME = "${PRODUCT_NAME}" + PRODUCT_NAME_LOW = "${PRODUCT_NAME_LOW}" + COMPANY_NAME = "${COMPANY_NAME}" + COMPANY_NAME_LOW = "${COMPANY_NAME_LOW}" } } diff --git a/build/scripts/standalone/entrypoint.sh b/build/scripts/standalone/entrypoint.sh index 9bc601218f..b19baad2b1 100644 --- a/build/scripts/standalone/entrypoint.sh +++ b/build/scripts/standalone/entrypoint.sh @@ -1,8 +1,8 @@ #!/bin/sh update_welcome_page() { - WELCOME_PAGE="/var/www/euro-office/documentserver-example/welcome/docker.html" - EXAMPLE_DISABLED_PAGE="/var/www/euro-office/documentserver-example/welcome/example-disabled.html" + WELCOME_PAGE="${EO_ROOT}-example/welcome/docker.html" + EXAMPLE_DISABLED_PAGE="${EO_ROOT}-example/welcome/example-disabled.html" # Replace systemctl placeholder (set at build time) with docker+supervisorctl equivalent sed -i 's|sudo systemctl start ds-example|sudo docker exec $(sudo docker ps -q) supervisorctl start ds:example|g' \ @@ -27,8 +27,8 @@ update_welcome_page() { fi } -# Create symlink for /config -> /etc/euro-office/documentserver so tools can find config -ln -sf /etc/euro-office/documentserver /config 2>/dev/null || true +# Create symlink for /config -> ${EO_CONF} so tools can find config +ln -sf ${EO_CONF} /config 2>/dev/null || true service postgresql start runuser -u rabbitmq -- rabbitmq-server -detached @@ -36,9 +36,9 @@ service redis-server start service nginx start # Ensure the api.js.tpl template exists (required by documentserver-flush-cache.sh) -API_TPL="/var/www/euro-office/documentserver/web-apps/apps/api/documents/api.js.tpl" -if [ ! -f "$API_TPL" ] && [ -f "/var/www/euro-office/documentserver/web-apps/apps/api/documents/api.js" ]; then - cp /var/www/euro-office/documentserver/web-apps/apps/api/documents/api.js "$API_TPL" +API_TPL="${EO_ROOT}/web-apps/apps/api/documents/api.js.tpl" +if [ ! -f "$API_TPL" ] && [ -f "${EO_ROOT}/web-apps/apps/api/documents/api.js" ]; then + cp ${EO_ROOT}/web-apps/apps/api/documents/api.js "$API_TPL" fi # Generate all fonts (AllFonts.js, font_selection.bin, presentation themes) @@ -89,7 +89,7 @@ enable_supervisor_program() { [ "${EXAMPLE_ENABLED:-false}" = "true" ] && enable_supervisor_program ds-example # Update example app config with JWT settings -EXAMPLE_CONF_DIR="/etc/euro-office/documentserver-example" +EXAMPLE_CONF_DIR="${EO_CONF}-example" EXAMPLE_LOCAL="${EXAMPLE_CONF_DIR}/local.json" if [ "${EXAMPLE_ENABLED:-false}" = "true" ] && [ -n "$JWT_SECRET" ]; then jq -n \ diff --git a/document-server-integration b/document-server-integration index 0b1d9b3ac3..4f8ef05fb5 160000 --- a/document-server-integration +++ b/document-server-integration @@ -1 +1 @@ -Subproject commit 0b1d9b3ac30d17954ab549b4ca16cacb643c2090 +Subproject commit 4f8ef05fb53a5e5a7edd13b4400466ba2c371d61 diff --git a/server b/server index 4d0caf457b..61918f78e0 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 4d0caf457bfec8e0380531e0090c3f983b2d5c58 +Subproject commit 61918f78e03fd813d201c644cca759be502c5cec From 0dbb374aeaa46ad3cedd1921a05796e84769dee9 Mon Sep 17 00:00:00 2001 From: Hendrik Leidinger Date: Tue, 26 May 2026 20:47:00 -0700 Subject: [PATCH 2/4] fix: cluster build, update subrepos Signed-off-by: Hendrik Leidinger --- build/.docker/orchestrated.bake.Dockerfile | 153 +++++++++++---------- document-server-integration | 2 +- server | 2 +- 3 files changed, 81 insertions(+), 76 deletions(-) diff --git a/build/.docker/orchestrated.bake.Dockerfile b/build/.docker/orchestrated.bake.Dockerfile index b0813d74ef..61277fb6ba 100644 --- a/build/.docker/orchestrated.bake.Dockerfile +++ b/build/.docker/orchestrated.bake.Dockerfile @@ -6,13 +6,13 @@ FROM fedora:43 AS ds-base LABEL maintainer Euro-Office - ARG COMPANY_NAME=euro-office + ARG COMPANY_NAME_LOW=euro-office ARG DS_VERSION_HASH - ENV COMPANY_NAME=$COMPANY_NAME \ - APPLICATION_NAME=$COMPANY_NAME \ + ENV COMPANY_NAME_LOW=$COMPANY_NAME_LOW \ + APPLICATION_NAME=$COMPANY_NAME_LOW \ DS_VERSION_HASH=$DS_VERSION_HASH \ NODE_ENV=production-linux \ - NODE_CONFIG_DIR=/etc/$COMPANY_NAME/documentserver \ + NODE_CONFIG_DIR=/etc/$COMPANY_NAME_LOW/documentserver \ PKG_NATIVE_CACHE_PATH=/tmp/.cache RUN dnf -y updateinfo list --security && \ @@ -52,8 +52,13 @@ FROM ds-base AS ds-service ARG PRODUCT_EDITION= ARG RELEASE_VERSION ARG PRODUCT_VERSION + ARG PRODUCT_NAME_LOW + ARG BUILD_NUMBER ENV TARGETARCH=$TARGETARCH \ - DS_VERSION_HASH=$DS_VERSION_HASH + DS_VERSION_HASH=$DS_VERSION_HASH \ + COMPANY_NAME_LOW=$COMPANY_NAME_LOW \ + PRODUCT_NAME_LOW=$PRODUCT_NAME_LOW \ + BUILD_NUMBER=$BUILD_NUMBER WORKDIR /ds COPY --from=packages / /tmp/ @@ -62,23 +67,23 @@ FROM ds-base AS ds-service rpm -ivh --nodigest \ https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm && \ TARGETARCH=$(echo $TARGETARCH | sed "s/"$TARGETARCH"/"$(uname -m)"/g") && \ - rpm -ivh /tmp/euro-office-documentserver-${PRODUCT_VERSION}-0.${TARGETARCH}.rpm --noscripts --nodeps && \ - mkdir -p /var/www/$COMPANY_NAME/documentserver/core-fonts/msttcore && \ + rpm -ivh /tmp/${COMPANY_NAME_LOW}-${PRODUCT_NAME_LOW}-${PRODUCT_VERSION}-${BUILD_NUMBER}.${TARGETARCH}.rpm --noscripts --nodeps && \ + mkdir -p /var/www/$COMPANY_NAME_LOW/documentserver/core-fonts/msttcore && \ cp -vt \ - /var/www/$COMPANY_NAME/documentserver/core-fonts/msttcore \ + /var/www/$COMPANY_NAME_LOW/documentserver/core-fonts/msttcore \ /usr/share/fonts/msttcore/*.ttf && \ - chmod a+r /etc/$COMPANY_NAME/documentserver*/*.json && \ - chmod a+r /etc/$COMPANY_NAME/documentserver/log4js/*.json + chmod a+r /etc/$COMPANY_NAME_LOW/documentserver*/*.json && \ + chmod a+r /etc/$COMPANY_NAME_LOW/documentserver/log4js/*.json COPY --chown=ds:ds \ build/configs/orchestrated/nginx/includes/http-common.conf \ build/configs/orchestrated/nginx/includes/http-upstream.conf \ - /etc/$COMPANY_NAME/documentserver/nginx/includes/ + /etc/$COMPANY_NAME_LOW/documentserver/nginx/includes/ #COPY --chown=ds:ds \ # fonts/ \ - # /var/www/$COMPANY_NAME/documentserver/core-fonts/custom/ + # /var/www/$COMPANY_NAME_LOW/documentserver/core-fonts/custom/ #COPY --chown=ds:ds \ # plugins/ \ - # /var/www/$COMPANY_NAME/documentserver/sdkjs-plugins/ + # /var/www/$COMPANY_NAME_LOW/documentserver/sdkjs-plugins/ #COPY --chown=ds:ds \ # dictionaries/ \ # /var/www/onlyoffice/documentserver/dictionaries/ @@ -86,7 +91,7 @@ FROM ds-base AS ds-service #python3 /var/www/onlyoffice/documentserver/server/dictionaries/update.py && \ documentserver-flush-cache.sh -h $DS_VERSION_HASH -r false # documentserver-pluginsmanager.sh -r false \ - # --update=\"/var/www/$COMPANY_NAME/documentserver/sdkjs-plugins/plugin-list-default.json\" + # --update=\"/var/www/$COMPANY_NAME_LOW/documentserver/sdkjs-plugins/plugin-list-default.json\" # -------------------------------------------------------------------------------- # This image contains ALL runtime components (DocService, Converter, Adminpanel and @@ -114,76 +119,76 @@ FROM ds-base AS docs #/usr/bin/documentserver-pluginsmanager.sh \ /usr/local/bin/ #COPY --from=ds-service \ - # /var/www/$COMPANY_NAME/documentserver/server/dictionaries/update.py \ - # /var/www/$COMPANY_NAME/documentserver/server/dictionaries/update.py + # /var/www/$COMPANY_NAME_LOW/documentserver/server/dictionaries/update.py \ + # /var/www/$COMPANY_NAME_LOW/documentserver/server/dictionaries/update.py COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/server/tools/allfontsgen \ - /var/www/$COMPANY_NAME/documentserver/server/tools/allfontsgen + /var/www/$COMPANY_NAME_LOW/documentserver/server/tools/allfontsgen \ + /var/www/$COMPANY_NAME_LOW/documentserver/server/tools/allfontsgen COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/server/tools/allthemesgen \ - /var/www/$COMPANY_NAME/documentserver/server/tools/allthemesgen + /var/www/$COMPANY_NAME_LOW/documentserver/server/tools/allthemesgen \ + /var/www/$COMPANY_NAME_LOW/documentserver/server/tools/allthemesgen COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/server/tools/pluginsmanager \ - /var/www/$COMPANY_NAME/documentserver/server/tools/pluginsmanager + /var/www/$COMPANY_NAME_LOW/documentserver/server/tools/pluginsmanager \ + /var/www/$COMPANY_NAME_LOW/documentserver/server/tools/pluginsmanager COPY --chown=ds:ds --chmod=644 --from=ds-service \ - /etc/$COMPANY_NAME/documentserver/nginx/ds.conf \ + /etc/$COMPANY_NAME_LOW/documentserver/nginx/ds.conf \ /etc/nginx/conf.d/ COPY --chown=ds:ds --chmod=644 --from=ds-service \ - /etc/$COMPANY_NAME/documentserver*/nginx/includes/*.conf \ + /etc/$COMPANY_NAME_LOW/documentserver*/nginx/includes/*.conf \ /etc/nginx/includes/ds-cache.conf \ /etc/nginx/includes/ COPY --chown=ds:ds --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/dictionaries \ - /var/www/$COMPANY_NAME/documentserver/dictionaries + /var/www/$COMPANY_NAME_LOW/documentserver/dictionaries \ + /var/www/$COMPANY_NAME_LOW/documentserver/dictionaries COPY --from=ds-service \ - /etc/$COMPANY_NAME/documentserver/default.json \ - /etc/$COMPANY_NAME/documentserver/production-linux.json \ - /etc/$COMPANY_NAME/documentserver/ + /etc/$COMPANY_NAME_LOW/documentserver/default.json \ + /etc/$COMPANY_NAME_LOW/documentserver/production-linux.json \ + /etc/$COMPANY_NAME_LOW/documentserver/ COPY --from=ds-service --chown=ds:ds \ - /etc/$COMPANY_NAME/documentserver/log4js/production.json \ - /etc/$COMPANY_NAME/documentserver/log4js/ + /etc/$COMPANY_NAME_LOW/documentserver/log4js/production.json \ + /etc/$COMPANY_NAME_LOW/documentserver/log4js/ COPY --chown=ds:ds --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/sdkjs-plugins \ - /var/www/$COMPANY_NAME/documentserver/sdkjs-plugins + /var/www/$COMPANY_NAME_LOW/documentserver/sdkjs-plugins \ + /var/www/$COMPANY_NAME_LOW/documentserver/sdkjs-plugins COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/core-fonts \ - /var/www/$COMPANY_NAME/documentserver/core-fonts + /var/www/$COMPANY_NAME_LOW/documentserver/core-fonts \ + /var/www/$COMPANY_NAME_LOW/documentserver/core-fonts COPY --chown=ds:ds --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/fonts \ - /var/www/$COMPANY_NAME/documentserver/fonts + /var/www/$COMPANY_NAME_LOW/documentserver/fonts \ + /var/www/$COMPANY_NAME_LOW/documentserver/fonts COPY --from=ds-service \ /usr/share/fonts \ /usr/share/fonts COPY --chown=ds:ds --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/sdkjs \ - /var/www/$COMPANY_NAME/documentserver/sdkjs + /var/www/$COMPANY_NAME_LOW/documentserver/sdkjs \ + /var/www/$COMPANY_NAME_LOW/documentserver/sdkjs COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/server/DocService \ - /var/www/$COMPANY_NAME/documentserver/server/DocService + /var/www/$COMPANY_NAME_LOW/documentserver/server/DocService \ + /var/www/$COMPANY_NAME_LOW/documentserver/server/DocService COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/server/FileConverter \ - /var/www/$COMPANY_NAME/documentserver/server/FileConverter + /var/www/$COMPANY_NAME_LOW/documentserver/server/FileConverter \ + /var/www/$COMPANY_NAME_LOW/documentserver/server/FileConverter COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/server/AdminPanel/server \ - /var/www/$COMPANY_NAME/documentserver/server/AdminPanel/server + /var/www/$COMPANY_NAME_LOW/documentserver/server/AdminPanel/server \ + /var/www/$COMPANY_NAME_LOW/documentserver/server/AdminPanel/server COPY --chown=ds:ds --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/server/AdminPanel/client \ + /var/www/$COMPANY_NAME_LOW/documentserver/server/AdminPanel/client \ /client #COPY --from=ds-service \ - # /var/www/$COMPANY_NAME/documentserver/server/info \ - # /var/www/$COMPANY_NAME/documentserver/server/info + # /var/www/$COMPANY_NAME_LOW/documentserver/server/info \ + # /var/www/$COMPANY_NAME_LOW/documentserver/server/info COPY --chown=ds:ds --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/web-apps \ - /var/www/$COMPANY_NAME/documentserver/web-apps + /var/www/$COMPANY_NAME_LOW/documentserver/web-apps \ + /var/www/$COMPANY_NAME_LOW/documentserver/web-apps COPY --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver/document-templates/new \ - /var/www/$COMPANY_NAME/documentserver/document-templates/new + /var/www/$COMPANY_NAME_LOW/documentserver/document-templates/new \ + /var/www/$COMPANY_NAME_LOW/documentserver/document-templates/new #COPY --from=ds-service \ - # /var/www/$COMPANY_NAME/documentserver/document-formats \ - # /var/www/$COMPANY_NAME/documentserver/document-formats + # /var/www/$COMPANY_NAME_LOW/documentserver/document-formats \ + # /var/www/$COMPANY_NAME_LOW/documentserver/document-formats COPY --chown=ds:ds --from=ds-service \ - /var/www/$COMPANY_NAME/documentserver-example/welcome \ - /var/www/$COMPANY_NAME/documentserver-example/welcome + /var/www/$COMPANY_NAME_LOW/documentserver-example/welcome \ + /var/www/$COMPANY_NAME_LOW/documentserver-example/welcome COPY build/scripts/orchestrated/docker-entrypoint.sh build/scripts/orchestrated/proxy-docker-entrypoint.sh /usr/local/bin/ COPY build/scripts/orchestrated/init-docker-entrypoint.sh /init/ RUN sed 's|\(application\/zip.*\)|\1\n application\/wasm wasm;|' \ @@ -202,24 +207,24 @@ FROM ds-base AS docs ln -sf /dev/stdout /var/log/nginx/access.log && \ ln -sf /dev/stderr /var/log/nginx/error.log && \ mkdir -p \ - /var/lib/$COMPANY_NAME/documentserver/App_Data/cache/files \ - /var/www/$COMPANY_NAME/config \ - /var/lib/$COMPANY_NAME/documentserver/App_Data/docbuilder && \ - chown -R ds:ds /var/lib/$COMPANY_NAME/documentserver /var/www/$COMPANY_NAME/config && \ + /var/lib/$COMPANY_NAME_LOW/documentserver/App_Data/cache/files \ + /var/www/$COMPANY_NAME_LOW/config \ + /var/lib/$COMPANY_NAME_LOW/documentserver/App_Data/docbuilder && \ + chown -R ds:ds /var/lib/$COMPANY_NAME_LOW/documentserver /var/www/$COMPANY_NAME_LOW/config && \ find \ - /var/www/$COMPANY_NAME/documentserver/fonts \ + /var/www/$COMPANY_NAME_LOW/documentserver/fonts \ -type f ! \ -name "*.*" \ -exec sh -c 'gzip -cf9 $0 > $0.gz && chown ds:ds $0.gz' {} \; && \ find \ - /var/www/$COMPANY_NAME/documentserver/sdkjs \ - /var/www/$COMPANY_NAME/documentserver/sdkjs-plugins \ - /var/www/$COMPANY_NAME/documentserver/web-apps \ - /var/www/$COMPANY_NAME/documentserver-example/welcome \ + /var/www/$COMPANY_NAME_LOW/documentserver/sdkjs \ + /var/www/$COMPANY_NAME_LOW/documentserver/sdkjs-plugins \ + /var/www/$COMPANY_NAME_LOW/documentserver/web-apps \ + /var/www/$COMPANY_NAME_LOW/documentserver-example/welcome \ -type f \ \( -name *.js -o -name *.json -o -name *.htm -o -name *.html -o -name *.css \) \ -exec sh -c 'gzip -cf9 $0 > $0.gz && chown ds:ds $0.gz' {} \; - VOLUME /var/lib/$COMPANY_NAME + VOLUME /var/lib/$COMPANY_NAME_LOW USER ds # -------------------------------------------------------------------- @@ -334,17 +339,17 @@ FROM python:3.11-slim-bookworm AS utils USER ds FROM statsd/statsd AS metrics - ARG COMPANY_NAME=euro-office - COPY --from=ds-service /var/www/$COMPANY_NAME/documentserver/server/Metrics/config/config.js /usr/src/app/config.js + ARG COMPANY_NAME_LOW=euro-office + COPY --from=ds-service /var/www/$COMPANY_NAME_LOW/documentserver/server/Metrics/config/config.js /usr/src/app/config.js FROM postgres:$POSTGRES_VERSION AS db - ARG COMPANY_NAME=euro-office - COPY --from=ds-service /var/www/$COMPANY_NAME/documentserver/server/schema/postgresql/createdb.sql /docker-entrypoint-initdb.d/ + ARG COMPANY_NAME_LOW=euro-office + COPY --from=ds-service /var/www/$COMPANY_NAME_LOW/documentserver/server/schema/postgresql/createdb.sql /docker-entrypoint-initdb.d/ FROM mysql:$MYSQL_VERSION AS mysqldb - ARG COMPANY_NAME=euro-office - COPY --chmod=777 --from=ds-service /var/www/$COMPANY_NAME/documentserver/server/schema/mysql/createdb.sql /docker-entrypoint-initdb.d/ + ARG COMPANY_NAME_LOW=euro-office + COPY --chmod=777 --from=ds-service /var/www/$COMPANY_NAME_LOW/documentserver/server/schema/mysql/createdb.sql /docker-entrypoint-initdb.d/ FROM mariadb:$MARIADB_VERSION AS db-mariadb - ARG COMPANY_NAME=euro-office - COPY --from=ds-service /var/www/$COMPANY_NAME/documentserver/server/schema/mysql/createdb.sql /docker-entrypoint-initdb.d/ \ No newline at end of file + ARG COMPANY_NAME_LOW=euro-office + COPY --from=ds-service /var/www/$COMPANY_NAME_LOW/documentserver/server/schema/mysql/createdb.sql /docker-entrypoint-initdb.d/ \ No newline at end of file diff --git a/document-server-integration b/document-server-integration index 4f8ef05fb5..8ac777f3b1 160000 --- a/document-server-integration +++ b/document-server-integration @@ -1 +1 @@ -Subproject commit 4f8ef05fb53a5e5a7edd13b4400466ba2c371d61 +Subproject commit 8ac777f3b10ac300f8b68ab8ca53b9a170afad25 diff --git a/server b/server index 61918f78e0..1c23e45042 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 61918f78e03fd813d201c644cca759be502c5cec +Subproject commit 1c23e45042ecd255283605afe89889ed255c0d55 From a88af6ba9b560dded88f6af4e42b0f07e1aa8e80 Mon Sep 17 00:00:00 2001 From: Hendrik Leidinger Date: Wed, 27 May 2026 08:03:13 -0700 Subject: [PATCH 3/4] chore: update submodules Signed-off-by: Hendrik Leidinger --- document-server-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document-server-package b/document-server-package index 4e9df15355..f60c04e66d 160000 --- a/document-server-package +++ b/document-server-package @@ -1 +1 @@ -Subproject commit 4e9df15355b03e481058c162d3f951f68ce2672d +Subproject commit f60c04e66dab5d9ae3ac34dec376f490ade45e71 From 026cb381775fa69dc5dc67d940f67653bdf7d189 Mon Sep 17 00:00:00 2001 From: Hendrik Leidinger Date: Thu, 28 May 2026 08:05:34 -0700 Subject: [PATCH 4/4] chore: update submodules Signed-off-by: Hendrik Leidinger --- document-server-integration | 2 +- document-server-package | 2 +- server | 2 +- web-apps | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/document-server-integration b/document-server-integration index 8ac777f3b1..b3eebf3e44 160000 --- a/document-server-integration +++ b/document-server-integration @@ -1 +1 @@ -Subproject commit 8ac777f3b10ac300f8b68ab8ca53b9a170afad25 +Subproject commit b3eebf3e44e9e9e70d0e0df279f9a6ac4e9240db diff --git a/document-server-package b/document-server-package index f60c04e66d..d8b53952e2 160000 --- a/document-server-package +++ b/document-server-package @@ -1 +1 @@ -Subproject commit f60c04e66dab5d9ae3ac34dec376f490ade45e71 +Subproject commit d8b53952e29e36059836d52a9c8ff55093575045 diff --git a/server b/server index 1c23e45042..2307f4bf06 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 1c23e45042ecd255283605afe89889ed255c0d55 +Subproject commit 2307f4bf06b018580c1f9524e6e81e23ecb8fd22 diff --git a/web-apps b/web-apps index aad5886bf5..7cc3e23c2a 160000 --- a/web-apps +++ b/web-apps @@ -1 +1 @@ -Subproject commit aad5886bf5745551f8bc3d825cee37880163d10c +Subproject commit 7cc3e23c2a881b7b3fe58e270f91b6926ec50e92