mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-31 07:50:08 +00:00
Add EuroOffice support modeled after OnlyOffice implementation
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/bd87016f-c321-49f1-93dd-d8baab660d3f Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
99ea91c5ef
commit
8471d870eb
@@ -51,6 +51,15 @@ http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI req
|
||||
}
|
||||
}
|
||||
|
||||
# EuroOffice
|
||||
route /eurooffice/* {
|
||||
uri strip_prefix /eurooffice
|
||||
reverse_proxy {$EUROOFFICE_HOST}:80 {
|
||||
header_up X-Forwarded-Host {http.request.hostport}/eurooffice
|
||||
header_up X-Forwarded-Proto https
|
||||
}
|
||||
}
|
||||
|
||||
# Talk
|
||||
route /standalone-signaling/* {
|
||||
uri strip_prefix /standalone-signaling
|
||||
|
||||
16
Containers/eurooffice/Dockerfile
Normal file
16
Containers/eurooffice/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM eurooffice/documentserver:latest
|
||||
|
||||
# USER root is probably used
|
||||
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
|
||||
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
|
||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||
wud.watch="false" \
|
||||
org.opencontainers.image.title="EuroOffice for Nextcloud AIO" \
|
||||
org.opencontainers.image.description="EuroOffice Document Server for Nextcloud All-in-One" \
|
||||
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
|
||||
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"
|
||||
7
Containers/eurooffice/healthcheck.sh
Normal file
7
Containers/eurooffice/healthcheck.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
nc -z 127.0.0.1 80 || exit 1
|
||||
@@ -896,6 +896,58 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# EuroOffice
|
||||
if [ "$EUROOFFICE_ENABLED" = 'yes' ]; then
|
||||
# Determine EuroOffice port based on host pattern
|
||||
if echo "$EUROOFFICE_HOST" | grep -q "nextcloud-.*-eurooffice"; then
|
||||
EUROOFFICE_PORT=80
|
||||
else
|
||||
EUROOFFICE_PORT=443
|
||||
fi
|
||||
|
||||
count=0
|
||||
while ! nc -z "$EUROOFFICE_HOST" "$EUROOFFICE_PORT" && [ "$count" -lt 90 ]; do
|
||||
echo "Waiting for EuroOffice to become available..."
|
||||
count=$((count+5))
|
||||
sleep 5
|
||||
done
|
||||
if [ "$count" -ge 90 ]; then
|
||||
bash /notify.sh "EuroOffice did not start in time!" "Skipping initialization and disabling eurooffice app."
|
||||
php /var/www/html/occ app:disable eurooffice
|
||||
else
|
||||
# Install or enable EuroOffice app as needed
|
||||
if ! [ -d "/var/www/html/custom_apps/eurooffice" ]; then
|
||||
php /var/www/html/occ app:install eurooffice
|
||||
elif [ "$(php /var/www/html/occ config:app:get eurooffice enabled)" != "yes" ]; then
|
||||
php /var/www/html/occ app:enable eurooffice
|
||||
elif [ "$SKIP_UPDATE" != 1 ]; then
|
||||
php /var/www/html/occ app:update eurooffice
|
||||
fi
|
||||
|
||||
# Set EuroOffice configuration
|
||||
php /var/www/html/occ config:system:set eurooffice editors_check_interval --value="0" --type=integer
|
||||
php /var/www/html/occ config:system:set eurooffice jwt_secret --value="$EUROOFFICE_SECRET"
|
||||
php /var/www/html/occ config:app:set eurooffice jwt_secret --value="$EUROOFFICE_SECRET"
|
||||
php /var/www/html/occ config:system:set eurooffice jwt_header --value="AuthorizationJwt"
|
||||
|
||||
# Adjust the EuroOffice host if using internal pattern
|
||||
if echo "$EUROOFFICE_HOST" | grep -q "nextcloud-.*-eurooffice"; then
|
||||
EUROOFFICE_HOST="$NC_DOMAIN/eurooffice"
|
||||
export EUROOFFICE_HOST
|
||||
fi
|
||||
|
||||
php /var/www/html/occ config:app:set eurooffice DocumentServerUrl --value="https://$EUROOFFICE_HOST"
|
||||
fi
|
||||
else
|
||||
# Remove EuroOffice app if disabled and removal is requested
|
||||
if [ "$REMOVE_DISABLED_APPS" = yes ] && \
|
||||
[ -d "/var/www/html/custom_apps/eurooffice" ] && \
|
||||
[ -n "$EUROOFFICE_SECRET" ] && \
|
||||
[ "$(php /var/www/html/occ config:system:get eurooffice jwt_secret)" = "$EUROOFFICE_SECRET" ]; then
|
||||
php /var/www/html/occ app:remove eurooffice
|
||||
fi
|
||||
fi
|
||||
|
||||
# Talk
|
||||
if [ "$TALK_ENABLED" = 'yes' ]; then
|
||||
set -x
|
||||
|
||||
Reference in New Issue
Block a user