From fa2de2bd39232b2f31e93bb400d2280fb417e631 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 2 Sep 2026 13:22:42 +0200 Subject: [PATCH] fix collabora image Signed-off-by: Simon L. --- Containers/collabora/Dockerfile | 12 ++---------- Containers/collabora/healthcheck.sh | 7 ------- Containers/collabora/start.sh | 19 ------------------- manual-install/update-yaml.sh | 1 + php/containers.json | 4 ++-- php/src/Data/ConfigurationManager.php | 12 ++++++++++++ 6 files changed, 17 insertions(+), 38 deletions(-) delete mode 100644 Containers/collabora/healthcheck.sh delete mode 100644 Containers/collabora/start.sh diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index a7de6c97..1fbc81a6 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -2,15 +2,9 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/blob/master/docker/from-packages/Dockerfile FROM collabora/code:26.04.3.2.1 -USER root:root -ARG DEBIAN_FRONTEND=noninteractive +# The base image ships no shell anymore, so no start.sh wrapper can be used here. +# ENTRYPOINT, USER and HEALTHCHECK are inherited from it on purpose. -COPY --chmod=775 start.sh /start.sh -COPY --chmod=775 healthcheck.sh /healthcheck.sh - -USER cool:cool - -HEALTHCHECK --start-period=60s --retries=9 CMD ["/healthcheck.sh"] LABEL com.centurylinklabs.watchtower.enable="false" \ wud.watch="false" \ dockhand.update="false" \ @@ -20,5 +14,3 @@ LABEL com.centurylinklabs.watchtower.enable="false" \ org.opencontainers.image.source="https://github.com/nextcloud/all-in-one" \ org.opencontainers.image.vendor="Nextcloud" \ org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md" - -ENTRYPOINT ["/start.sh"] diff --git a/Containers/collabora/healthcheck.sh b/Containers/collabora/healthcheck.sh deleted file mode 100644 index 45e9278b..00000000 --- a/Containers/collabora/healthcheck.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Unfortunately, no curl and no nc is installed in the container -# and packages can also not be added as the package list is broken. -# So always exiting 0 for now. -# nc http://127.0.0.1:9980 || exit 1 -exit 0 diff --git a/Containers/collabora/start.sh b/Containers/collabora/start.sh deleted file mode 100644 index 3dec2f9d..00000000 --- a/Containers/collabora/start.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -if [ "$AIO_LOG_LEVEL" = 'debug' ]; then - set -x -fi - -if [ "$AIO_LOG_LEVEL" = "warn" ]; then - COLLABORA_LOG_LEVEL="warning" -elif [ "$AIO_LOG_LEVEL" = "info" ]; then - COLLABORA_LOG_LEVEL="notice" -else - COLLABORA_LOG_LEVEL="$AIO_LOG_LEVEL" -fi - -# Replace the hardcoded log level in extra_params with the translated one -extra_params+=" --o:logging.level=$COLLABORA_LOG_LEVEL --o:logging.level_startup=$COLLABORA_LOG_LEVEL" -export extra_params - -exec /start-collabora-online.sh "$@" diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index cbf36668..094428c4 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -97,6 +97,7 @@ sed -i 's|NC_DOMAIN=|NC_DOMAIN=yourdomain.com # TODO! Needs to be chang sed -i 's|NEXTCLOUD_PASSWORD=|NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin".|' sample.conf sed -i 's|TIMEZONE=|TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use.|' sample.conf sed -i 's|COLLABORA_SECCOMP_POLICY=|COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container.|' sample.conf +sed -i 's|COLLABORA_LOG_LEVEL=|COLLABORA_LOG_LEVEL=warning # Allows to adjust the log level of the Collabora container. Valid values are none, fatal, critical, error, warning, notice, information, debug and trace.|' sample.conf sed -i 's|AIO_LOG_LEVEL=|AIO_LOG_LEVEL=warn # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.|' sample.conf sed -i 's|FULLTEXTSEARCH_JAVA_OPTIONS=|FULLTEXTSEARCH_JAVA_OPTIONS="-Xms512M -Xmx512M" # Allows to adjust the fulltextsearch java options.|' sample.conf sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. You can also disable apps by using a hyphen in front of them. E.g. "-app_api"|' sample.conf diff --git a/php/containers.json b/php/containers.json index fcd63395..f2007fd1 100644 --- a/php/containers.json +++ b/php/containers.json @@ -379,7 +379,7 @@ "init": true, "healthcheck": { "start_period": "60s", - "test": "/healthcheck.sh", + "test": "/usr/bin/coolwsd --probe --use-env-vars", "interval": "30s", "timeout": "30s", "start_interval": "5s", @@ -391,7 +391,7 @@ "internal_port": "9980", "environment": [ "aliasgroup1=https://%NC_DOMAIN%:443,http://nextcloud-aio-apache.nextcloud-aio:23973", - "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.disable_server_audit=true --o:welcome.enable=false --o:fetch_update_check=0 --o:allow_update_popup=false %COLLABORA_SECCOMP_POLICY% --o:remote_font_config.url=https://%NC_DOMAIN%/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+", + "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.disable_server_audit=true --o:welcome.enable=false --o:fetch_update_check=0 --o:allow_update_popup=false %COLLABORA_SECCOMP_POLICY% --o:logging.level=%COLLABORA_LOG_LEVEL% --o:logging.level_startup=%COLLABORA_LOG_LEVEL% --o:remote_font_config.url=https://%NC_DOMAIN%/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+", "dictionaries=%COLLABORA_DICTIONARIES%", "AIO_LOG_LEVEL=%AIO_LOG_LEVEL%", "TZ=%TIMEZONE%", diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index e268fea1..98c18334 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -896,6 +896,17 @@ class ConfigurationManager return $defaultString . 'false'; } + /** + * Translates AIO's global log level into the log levels that coolwsd accepts. + */ + public function getCollaboraLogLevel() : string { + return match ($this->aioLogLevel) { + 'warn' => 'warning', + 'info' => 'notice', + default => $this->aioLogLevel, + }; + } + /** * @throws InvalidSettingConfigurationException */ @@ -1235,6 +1246,7 @@ class ConfigurationManager 'BORGBACKUP_HOST_LOCATION' => $this->borgBackupHostLocation, 'APACHE_MAX_SIZE' => (string)($this->getApacheMaxSize()), 'COLLABORA_SECCOMP_POLICY' => $this->getCollaboraSeccompPolicy(), + 'COLLABORA_LOG_LEVEL' => $this->getCollaboraLogLevel(), 'NEXTCLOUD_STARTUP_APPS' => $this->getNextcloudStartupApps(), 'NEXTCLOUD_ADDITIONAL_APKS' => $this->nextcloudAdditionalApks, 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->nextcloudAdditionalPhpExtensions,