add our own entrypoint to fts and collabora

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L.
2026-04-28 15:32:07 +02:00
parent 47307b37f8
commit 4f4ef8f1d6
8 changed files with 33 additions and 19 deletions

View File

@@ -5,6 +5,7 @@ FROM collabora/code:25.04.9.4.1
USER root
ARG DEBIAN_FRONTEND=noninteractive
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
USER 1001
@@ -18,3 +19,5 @@ 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"]

View File

@@ -0,0 +1,17 @@
#!/bin/bash
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
COLLABORA_LOG_LEVEL="warning"
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 "$@"

View File

@@ -16,6 +16,7 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*;
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
USER 1000:0
@@ -30,3 +31,5 @@ LABEL com.centurylinklabs.watchtower.enable="false" \
org.opencontainers.image.vendor="Nextcloud" \
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"
ENV ES_JAVA_OPTS="-Xms512M -Xmx512M"
ENTRYPOINT ["/start.sh"]

View File

@@ -0,0 +1,9 @@
#!/bin/bash
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
ELASTIC_LOG_LEVEL="$(echo "$AIO_LOG_LEVEL" | tr '[:lower:]' '[:upper:]')"
exec env "logger.level=$ELASTIC_LOG_LEVEL" /usr/local/bin/docker-entrypoint.sh "$@"

View File

@@ -26,9 +26,7 @@ APACHE_MAX_SIZE=17179869184 # This needs to be an integer and in sync w
APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else).
ADDITIONAL_COLLABORA_OPTIONS=['--o:security.seccomp=true'] # You can add additional collabora options here by using the array syntax.
AIO_LOG_LEVEL=warn # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.
COLLABORA_LOG_LEVEL=warning # Allows to adjust the Collabora log level. Valid values are debug, info, warning and error.
COLLABORA_DICTIONARIES="de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru" # You can change this in order to enable other dictionaries for collabora
ELASTIC_LOG_LEVEL=WARN # Allows to adjust the Fulltextsearch (Elasticsearch) log level. Valid values are TRACE, DEBUG, INFO, WARN and ERROR.
FULLTEXTSEARCH_JAVA_OPTIONS="-Xms512M -Xmx512M" # Allows to adjust the fulltextsearch java options.
INSTALL_LATEST_MAJOR=no # Setting this to yes will install the latest Major Nextcloud version upon the first installation
NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value.

View File

@@ -101,8 +101,6 @@ sed -i 's|NEXTCLOUD_PASSWORD=|NEXTCLOUD_PASSWORD= # TODO! This is the p
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|AIO_LOG_LEVEL=|AIO_LOG_LEVEL=warning # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.|' sample.conf
sed -i 's|COLLABORA_LOG_LEVEL=|COLLABORA_LOG_LEVEL=warning # Allows to adjust the Collabora log level. Valid values are debug, info, warning and error.|' sample.conf
sed -i 's|ELASTIC_LOG_LEVEL=|ELASTIC_LOG_LEVEL=WARN # Allows to adjust the Fulltextsearch (Elasticsearch) log level. Valid values are TRACE, 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|' sample.conf
sed -i 's|NEXTCLOUD_ADDITIONAL_APKS=|NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value.|' sample.conf

View File

@@ -386,7 +386,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:logging.level=%COLLABORA_LOG_LEVEL% --o:logging.level_startup=%COLLABORA_LOG_LEVEL% --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: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%",
@@ -826,7 +826,6 @@
"bootstrap.memory_lock=false",
"cluster.name=nextcloud-aio",
"discovery.type=single-node",
"logger.level=%ELASTIC_LOG_LEVEL%",
"http.port=9200",
"xpack.license.self_generated.type=basic",
"xpack.security.enabled=false",

View File

@@ -1071,8 +1071,6 @@ class ConfigurationManager
'NC_BASE_DN' => $this->getBaseDN(),
'AIO_TOKEN' => $this->aioToken,
'AIO_LOG_LEVEL' => $this->aioLogLevel,
'COLLABORA_LOG_LEVEL' => $this->getCollaboraLogLevel(),
'ELASTIC_LOG_LEVEL' => $this->getElasticLogLevel(),
'BORGBACKUP_REMOTE_REPO' => $this->borgRemoteRepo,
'BORGBACKUP_MODE' => $this->backupMode,
'AIO_URL' => $this->aioUrl,
@@ -1120,17 +1118,6 @@ class ConfigurationManager
default => $this->getRegisteredSecret($placeholder),
};
}
private function getCollaboraLogLevel() : string {
return match ($this->aioLogLevel) {
'warn' => 'warning',
default => $this->aioLogLevel,
};
}
private function getElasticLogLevel() : string {
return strtoupper($this->aioLogLevel);
}
private function booleanize(mixed $value) : bool {
return in_array($value, [true, 'true'], true);