From 90ba2f7e92af2505b55744d9b320ea7fba380a93 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 22 Mar 2022 19:34:16 +0100 Subject: [PATCH] fix a few things Signed-off-by: szaimen --- Containers/apache/Caddyfile | 4 ++- Containers/nextcloud/entrypoint.sh | 4 +++ php/containers.json | 3 +- php/src/Controller/DockerController.php | 1 + php/templates/containers.twig | 38 +++++++++++++------------ 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/Containers/apache/Caddyfile b/Containers/apache/Caddyfile index 875e6a07..01222f5c 100644 --- a/Containers/apache/Caddyfile +++ b/Containers/apache/Caddyfile @@ -34,7 +34,9 @@ # Onlyoffice route /onlyoffice/* { uri strip_prefix /onlyoffice - reverse_proxy {$ONLYOFFICE_HOST}:80 + reverse_proxy {$ONLYOFFICE_HOST}:80 { + header_up X-Forwarded-Host {http.request.host}/onlyoffice + } } # Nextcloud diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 63df5b76..ec239a2c 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -297,6 +297,10 @@ fi # OnlyOffice if [ "$ONLYOFFICE_ENABLED" = 'yes' ]; then + while ! nc -z "$ONLYOFFICE_HOST" 80; do + echo "waiting for OnlyOffice to become available..." + sleep 5 + done if ! [ -d "/var/www/html/custom_apps/onlyoffice" ]; then php /var/www/html/occ app:install onlyoffice elif [ "$(php /var/www/html/occ config:app:get onlyoffice enabled)" = "no" ]; then diff --git a/php/containers.json b/php/containers.json index 93b429ce..182bcecd 100644 --- a/php/containers.json +++ b/php/containers.json @@ -131,7 +131,8 @@ "CLAMAV_HOST=nextcloud-aio-clamav", "ONLYOFFICE_ENABLED=%ONLYOFFICE_ENABLED%", "COLLABORA_ENABLED=%COLLABORA_ENABLED%", - "TALK_ENABLED=%TALK_ENABLED%" + "TALK_ENABLED=%TALK_ENABLED%", + "ONLYOFFICE_HOST=nextcloud-aio-onlyoffice" ], "maxShutdownTime": 10, "restartPolicy": "unless-stopped" diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 3edf1901..fa240b1a 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -185,6 +185,7 @@ class DockerController } } + $this->StopDomaincheckContainer(); $this->PerformRecursiveContainerStart($id); // Cache the start for 10 minutes diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 7b4ef3ac..3073936f 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -82,10 +82,10 @@ {% if isAnyRunning == true %} {% if isApacheStarting != true %}
- Click here to reveal the initial Nextcloud credentials

+ Click here to reveal the initial Nextcloud credentials
Initial Nextcloud username: admin
- Initial Nextcloud password: {{ nextcloud_password }}

-
+ Initial Nextcloud password: {{ nextcloud_password }} +

Open your Nextcloud ↗
{% else %} {% if isAnyRestarting == false %} @@ -208,16 +208,18 @@

Backup information

{% if has_backup_run_once == true %}
- Click here to reveal the backup information

+ Click here to reveal the backup information
{% endif %} This is your encryption password for backups: {{ borgbackup_password }}

Please save it at a safe place since you won't be able to restore from backup if you loose this password!

Backed up will get all important data of your Nextcloud AIO instance like the database, your files and configuration files of the mastercontainer and else.

The backup itself will use a tool that is called BorgBackup which is a well-known server backup tool that efficiently backs up your files and encrypts them on the fly.

Backups get created in the following directory on the host: {{ borg_backup_host_location }}/borg

- Be aware that this solution does not back up files and folders that are mounted into Nextcloud using the external storage app.

- {% if has_backup_run_once == true %} -
+ Be aware that this solution does not back up files and folders that are mounted into Nextcloud using the external storage app. + {% if has_backup_run_once == false %} +

+ {% else %} +

{% endif %} {% if isApacheStarting != true %} @@ -285,7 +287,7 @@ {% if isApacheStarting == false %}

AIO password change

- Click here to change your AIO password

+ Click here to change your AIO password
You can change your AIO password below:

@@ -294,8 +296,8 @@
- The new password needs to be at least 24 characters long. Allowed characters are the
latin characters a-z, A-Z, 0-9 and spaces.

-
+ The new password needs to be at least 24 characters long. Allowed characters are the latin characters a-z, A-Z, 0-9 and spaces. +

{% endif %} {% endif %} {% endif %} @@ -308,24 +310,24 @@ {% if is_clamav_enabled == true %} - +
{% else %} - +
{% endif %} {% if is_collabora_enabled == true %} - +
{% else %} - +
{% endif %} {% if is_onlyoffice_enabled == true %} - +
{% else %} - +
{% endif %} {% if is_talk_enabled == true %} - +
{% else %} - +
{% endif %}