From 34d5ee62989c33e9c241b0b58fe3c0c41999db04 Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 26 Aug 2022 22:35:42 +0200 Subject: [PATCH 0001/3949] use the correct syntax for running from an external script Signed-off-by: szaimen --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index a9d245ad..f4a12ba4 100644 --- a/readme.md +++ b/readme.md @@ -382,7 +382,7 @@ You can do so by running the `/daily-backup.sh` script that is stored in the mas - `START_CONTAINERS` if set to `1`, it will automatically start the containers without updating them. - `STOP_CONTAINERS` if set to `1`, it will automatically stop the containers. -One example for this would be `sudo docker exec -it nextcloud-aio-mastercontainer DAILY_BACKUP=1 /daily-backup.sh`, which you can run via a cronjob or put it in a script. +One example for this would be `sudo docker exec -it -e DAILY_BACKUP=1 nextcloud-aio-mastercontainer /daily-backup.sh`, which you can run via a cronjob or put it in a script. ### How to disable the backup section? If you already have a backup solution in place, you may want to hide the backup section. You can do so by adding `-e DISABLE_BACKUP_SECTION=true` to the initial startup of the mastercontainer. From c872c259c15eac954f9aaa372af477df80e4133c Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 26 Aug 2022 22:52:19 +0200 Subject: [PATCH 0002/3949] do not pull containers START_CONTAINERS was provided and not AUTOMATIC_UPDATES Signed-off-by: szaimen --- php/src/Controller/DockerController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 9db7d627..74891d5f 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -30,20 +30,19 @@ class DockerController $container = $this->containerDefinitionFetcher->GetContainerById($id); foreach($container->GetDependsOn() as $dependency) { - $this->PerformRecursiveContainerStart($dependency); + $this->PerformRecursiveContainerStart($dependency, $pullContainer); } if ($id === 'nextcloud-aio-database') { if ($this->dockerActionManager->GetDatabasecontainerExitCode() > 0) { $pullContainer = false; + error_log('Not pulling the latest database image because the container was not correctly shut down.'); } } $this->dockerActionManager->DeleteContainer($container); $this->dockerActionManager->CreateVolumes($container); if ($pullContainer) { $this->dockerActionManager->PullContainer($container); - } else { - error_log('Not pulling the latest database image because the container was not correctly shut down.'); } $this->dockerActionManager->CreateContainer($container); $this->dockerActionManager->StartContainer($container); From ed82a41bc1ce5caeeb979fe752addd4e478fff86 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 27 Aug 2022 16:13:08 +0200 Subject: [PATCH 0003/3949] remove resolved issues from nginx docs Signed-off-by: szaimen --- reverse-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 68ffeccc..ec29d6c9 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -141,7 +141,7 @@ Although it does not seems like it is the case but from AIO perspective a Cloudf click here to expand -**Disclaimer:** the config below is not working 100% correctly, yet. See e.g. https://github.com/nextcloud/all-in-one/issues/450, https://github.com/nextcloud/all-in-one/issues/447 and https://github.com/nextcloud/all-in-one/issues/491. Improvements to it are very welcome! +**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome! Add this to you nginx config: From 7ad975f4b15598cb86395c267a0376855c51b2cb Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 30 Aug 2022 14:24:31 +0200 Subject: [PATCH 0004/3949] the dbpassword and dbuser do not need to be overwritten anymore Signed-off-by: szaimen --- Containers/nextcloud/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 7cec862c..92cef7f8 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -17,8 +17,9 @@ if [ -f "/var/www/html/config/config.php" ]; then echo "Waiting for the database to start..." sleep 5 done - sed -i "s|'dbuser'.*=>.*$|'dbuser' => '$POSTGRES_USER',|" /var/www/html/config/config.php - sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php + # The code below is hopefully not needed anymore. Was introduced with https://github.com/nextcloud/all-in-one/pull/218 + # sed -i "s|'dbuser'.*=>.*$|'dbuser' => '$POSTGRES_USER',|" /var/www/html/config/config.php + # sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php fi # Run original entrypoint From 5eaff0ba2fbdc9af97abb31f0f57fe365fffbe4c Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 31 Aug 2022 13:45:23 +0200 Subject: [PATCH 0005/3949] fix container logs new line Signed-off-by: szaimen --- php/src/Docker/DockerActionManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 43f84deb..74cb4a96 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -162,11 +162,11 @@ class DockerActionManager $response = ""; $separator = "\r\n"; $line = strtok($responseBody, $separator); - $response = substr($line, 8) . "\n"; + $response = substr($line, 8) . $separator; while ($line !== false) { $line = strtok($separator); - $response .= substr($line, 8) . "\n"; + $response .= substr($line, 8) . $separator; } return $response; From d6e1f6220270fc7d1058f3fcdaf359f4bd3a629a Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 31 Aug 2022 14:00:37 +0200 Subject: [PATCH 0006/3949] rework the daily backup script and allow to start the backup check from it Signed-off-by: szaimen --- Containers/mastercontainer/daily-backup.sh | 28 ++++++++++++++++++---- php/src/Controller/DockerController.php | 7 ++++-- php/src/Cron/CheckBackup.php | 17 +++++++++++++ readme.md | 1 + 4 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 php/src/Cron/CheckBackup.php diff --git a/Containers/mastercontainer/daily-backup.sh b/Containers/mastercontainer/daily-backup.sh index 09eefec1..8f6ecb6a 100644 --- a/Containers/mastercontainer/daily-backup.sh +++ b/Containers/mastercontainer/daily-backup.sh @@ -1,10 +1,16 @@ #!/bin/bash -echo "Daily backup has started" +echo "Daily backup script has started" + +# Daily backup and backup check cannot be run at the same time +if [ "$DAILY_BACKUP" = 1 ] && [ "$CHECK_BACKUP" = 1 ]; then + echo "Daily backup and backup check cannot be run at the same time. Exiting..." + exit 1 +fi # Delete all active sessions and create a lock file # But don't kick out the user if the mastercontainer was just updated since we block the interface either way with the lock file -if [ "$LOCK_FILE_PRESENT" = 0 ]; then +if [ "$LOCK_FILE_PRESENT" = 0 ] || ! [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then rm -f "/mnt/docker-aio-config/session/"* fi sudo -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running" @@ -26,6 +32,8 @@ done # Update the mastercontainer if [ "$AUTOMATIC_UPDATES" = 1 ]; then + echo "Starting mastercontainer update..." + echo "(The script might get exited due to that. In order to update all the other containers correctly, you need to run this script with the same settings a second time.)" sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateMastercontainer.php fi @@ -40,20 +48,31 @@ else fi # Stop containers if required -if [ "$DAILY_BACKUP" != 1 ] || [ "$STOP_CONTAINERS" = 1 ]; then +# shellcheck disable=SC2235 +if [ "$CHECK_BACKUP" != 1 ] && ([ "$DAILY_BACKUP" != 1 ] || [ "$STOP_CONTAINERS" = 1 ]); then + echo "Stopping containers..." sudo -u www-data php /var/www/docker-aio/php/src/Cron/StopContainers.php fi # Execute the backup itself and some related tasks (also stops the containers) if [ "$DAILY_BACKUP" = 1 ]; then + echo "Creating daily backup..." sudo -u www-data php /var/www/docker-aio/php/src/Cron/CreateBackup.php fi +# Execute backup check +if [ "$CHECK_BACKUP" = 1 ]; then + echo "Starting backup check..." + sudo -u www-data php /var/www/docker-aio/php/src/Cron/CheckBackup.php +fi + # Start and/or update containers if [ "$AUTOMATIC_UPDATES" = 1 ]; then + echo "Starting and updating containers..." sudo -u www-data php /var/www/docker-aio/php/src/Cron/StartAndUpdateContainers.php else if [ "$START_CONTAINERS" = 1 ]; then + echo "Starting containers without updating them..." sudo -u www-data php /var/www/docker-aio/php/src/Cron/StartContainers.php fi fi @@ -75,7 +94,8 @@ if [ "$DAILY_BACKUP" = 1 ]; then fi done fi + echo "Sending backup notification..." sudo -u www-data php /var/www/docker-aio/php/src/Cron/BackupNotification.php fi -echo "Daily backup has finished" +echo "Daily backup script has finished" diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 9db7d627..79041095 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -86,14 +86,17 @@ class DockerController } public function StartBackupContainerCheck(Request $request, Response $response, $args) : Response { + $this->checkBackup(); + return $response->withStatus(201)->withHeader('Location', '/'); + } + + public function checkBackup() : void { $config = $this->configurationManager->GetConfig(); $config['backup-mode'] = 'check'; $this->configurationManager->WriteConfig($config); $id = 'nextcloud-aio-borgbackup'; $this->PerformRecursiveContainerStart($id); - - return $response->withStatus(201)->withHeader('Location', '/'); } public function StartBackupContainerRestore(Request $request, Response $response, $args) : Response { diff --git a/php/src/Cron/CheckBackup.php b/php/src/Cron/CheckBackup.php new file mode 100644 index 00000000..6d9b027c --- /dev/null +++ b/php/src/Cron/CheckBackup.php @@ -0,0 +1,17 @@ +get(\AIO\Controller\DockerController::class); + +// Stop container and start backup check +$dockerController->checkBackup(); diff --git a/readme.md b/readme.md index f4a12ba4..d564caef 100644 --- a/readme.md +++ b/readme.md @@ -381,6 +381,7 @@ You can do so by running the `/daily-backup.sh` script that is stored in the mas - `DAILY_BACKUP` if set to `1`, it will automatically stop the containers and create a backup. If you want to start them again afterwards, you may have a look at the `START_CONTAINERS` option. Please be aware that this option is non-blocking which means that the backup is not done when the process is finished since it only start the borgbackup container with the correct configuration. - `START_CONTAINERS` if set to `1`, it will automatically start the containers without updating them. - `STOP_CONTAINERS` if set to `1`, it will automatically stop the containers. +- `CHECK_BACKUP` if set to `1`, it will start the backup check. This is not allowed to be enabled at the same time like `DAILY_BACKUP`. One example for this would be `sudo docker exec -it -e DAILY_BACKUP=1 nextcloud-aio-mastercontainer /daily-backup.sh`, which you can run via a cronjob or put it in a script. From ec1605d29afbdb5cec4d6d740a109a80820952cf Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 31 Aug 2022 14:22:11 +0200 Subject: [PATCH 0007/3949] do not show progress for borg operations Signed-off-by: szaimen --- Containers/borgbackup/backupscript.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index c6b07d17..293c57c6 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -124,14 +124,14 @@ if [ "$BORG_MODE" = backup ]; then # Borg options # auto,zstd compression seems to has the best ratio based on: # https://forum.level1techs.com/t/optimal-compression-for-borg-backups/145870/6 - BORG_OPTS=(--stats --progress --compression "auto,zstd" --exclude-caches --checkpoint-interval 86400) + BORG_OPTS=(--stats --compression "auto,zstd" --exclude-caches --checkpoint-interval 86400) # Create the backup echo "Starting the backup..." get_start_time if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/"; then echo "Deleting the failed backup archive..." - borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" + borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" echo "Backup failed!" exit 1 fi @@ -140,7 +140,7 @@ if [ "$BORG_MODE" = backup ]; then rm -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update" # Prune options - BORG_PRUNE_OPTS=(--stats --progress --keep-within=7d --keep-weekly=4 --keep-monthly=6 "$BORG_BACKUP_DIRECTORY") + BORG_PRUNE_OPTS=(--stats --keep-within=7d --keep-weekly=4 --keep-monthly=6 "$BORG_BACKUP_DIRECTORY") # Prune archives echo "Pruning the archives..." @@ -162,7 +162,7 @@ if [ "$BORG_MODE" = backup ]; then done if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then echo "Deleting the failed backup archive..." - borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes" + borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes" echo "Backup of additional docker-volumes failed!" exit 1 fi @@ -186,7 +186,7 @@ if [ "$BORG_MODE" = backup ]; then done if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then echo "Deleting the failed backup archive..." - borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts" + borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts" echo "Backup of additional host-mounts failed!" exit 1 fi @@ -320,7 +320,7 @@ if [ "$BORG_MODE" = check ]; then echo "Checking the backup integrity..." # Perform the check - if ! borg check --verify-data --progress "$BORG_BACKUP_DIRECTORY"; then + if ! borg check --verify-data "$BORG_BACKUP_DIRECTORY"; then echo "Some errors were found while checking the backup integrity!" exit 1 fi From 999c74a731616338f0bff78379f0c6d9dc6cf96f Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 31 Aug 2022 15:28:43 +0200 Subject: [PATCH 0008/3949] get rid of some strange lines in the mastercontainer logs Signed-off-by: szaimen --- Containers/mastercontainer/session-deduplicator.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Containers/mastercontainer/session-deduplicator.sh b/Containers/mastercontainer/session-deduplicator.sh index 4326090a..796ccb54 100644 --- a/Containers/mastercontainer/session-deduplicator.sh +++ b/Containers/mastercontainer/session-deduplicator.sh @@ -2,15 +2,18 @@ while true; do while [ "$(find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep "aio_authenticated|[a-z]:1" {} \; | wc -l)" -gt 1 ]; do + # First delete all session files that are not authenticated unset SESSION_FILES SESSION_FILES="$(find "/mnt/docker-aio-config/session/" -mindepth 1)" unset SESSION_FILES_ARRAY mapfile -t SESSION_FILES_ARRAY <<< "$SESSION_FILES" for SESSION_FILE in "${SESSION_FILES_ARRAY[@]}"; do - if ! grep -q "aio_authenticated|[a-z]:1" "$SESSION_FILE"; then + if [ -f "$SESSION_FILE" ] && ! grep -q "aio_authenticated|[a-z]:1" "$SESSION_FILE"; then rm "$SESSION_FILE" fi done + + # Second clean up all sessions that are authenticated echo "Deleting duplicate sessions" unset OLDEST_FILE set -x From 92b16393299690ba585f12866591831e23b79714 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Fri, 2 Sep 2022 05:35:32 +0000 Subject: [PATCH 0009/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index 216fe08f..5a180b35 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From b61d2d46fd06c780936349d75a418cbe1ee812d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Sep 2022 12:35:07 +0000 Subject: [PATCH 0010/3949] Bump ubuntu from focal-20220801 to focal-20220826 in /Containers/talk Bumps ubuntu from focal-20220801 to focal-20220826. --- updated-dependencies: - dependency-name: ubuntu dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/talk/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index 6b666374..1a7e3dfb 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220801 +FROM ubuntu:focal-20220826 RUN set -ex; \ \ From fa4eb448985b0cbf8e4db0d6559f7cf362dc1bbb Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 3 Sep 2022 15:43:40 +0200 Subject: [PATCH 0011/3949] Allow to choose a different backup location if the first backup fails Signed-off-by: szaimen --- Containers/borgbackup/backupscript.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index c6b07d17..286cfed1 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -87,10 +87,12 @@ if [ "$BORG_MODE" = backup ]; then # Don't initialize if already initialized if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then echo "Cannot initialize a new repository as that was already done at least one time." + echo "If you still want to do so, you may delete the 'borg.config' file that is stored in the mastercontainer volume manually, which will allow you to initialize a new borg repository in the chosen directory." exit 1 fi echo "initializing repository..." + NEW_REPOSITORY=1 if ! borg init --debug --encryption=repokey-blake2 "$BORG_BACKUP_DIRECTORY"; then echo "Could not initialize borg repository." rm -f "$BORG_BACKUP_DIRECTORY/config" @@ -133,6 +135,10 @@ if [ "$BORG_MODE" = backup ]; then echo "Deleting the failed backup archive..." borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" echo "Backup failed!" + if [ "$NEW_REPOSITORY" = 1 ]; then + echo "Deleting borg.config file so that you can choose a different location for the backup." + rm "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" + fi exit 1 fi From 27e0080ed0e33866ef75f9b3036385e13338ab40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 5 Sep 2022 10:01:43 +0200 Subject: [PATCH 0012/3949] Fix typo in mastercontainer start.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Brey --- Containers/mastercontainer/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index 38c38975..fc613b73 100755 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -220,7 +220,7 @@ print_green "Initial startup of Nextcloud All In One complete! You should be able to open the Nextcloud AIO Interface now on port 8080 of this server! E.g. https://internal.ip.of.this.server:8080 -If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatially by opening the Nextcloud AIO Interface via: +If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via: https://your-domain-that-points-to-this-server.tld:8443" # Set the timezone to UTC From 59bbff23fe203c39571ad8cb61150e48a73495b1 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 5 Sep 2022 13:23:40 +0200 Subject: [PATCH 0013/3949] improve healthcheck for mastercontainer Signed-off-by: szaimen --- Containers/mastercontainer/Dockerfile | 6 ++++-- Containers/mastercontainer/healthcheck.sh | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Containers/mastercontainer/healthcheck.sh diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 37442eb2..9b9b764e 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -90,16 +90,18 @@ COPY session-deduplicator.sh / COPY cron.sh / COPY daily-backup.sh / COPY supervisord.conf / +COPY healthcheck.sh / RUN chmod +x /usr/bin/start.sh; \ chmod +x /cron.sh; \ chmod +x /session-deduplicator.sh; \ chmod +x /backup-time-file-watcher.sh; \ chmod +x /daily-backup.sh; \ - chmod a+r /Caddyfile + chmod a+r /Caddyfile; \ + chmod +x /healthcheck.sh USER root ENTRYPOINT ["start.sh"] CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] -HEALTHCHECK CMD curl -skfI https://localhost:8080 || exit 1 \ No newline at end of file +HEALTHCHECK CMD /healthcheck.sh \ No newline at end of file diff --git a/Containers/mastercontainer/healthcheck.sh b/Containers/mastercontainer/healthcheck.sh new file mode 100644 index 00000000..3a0d0b33 --- /dev/null +++ b/Containers/mastercontainer/healthcheck.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ -f "/mnt/docker-aio-config/data/configuration.json" ]; then + curl -skfI https://localhost:8080 || exit 1 +fi From 3f48169f5c22e6c4783d6ed67e30c974c47a582f Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 5 Sep 2022 13:32:14 +0200 Subject: [PATCH 0014/3949] increase to 2.0.1 Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index cde78a36..0749482e 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.0.0

+

Nextcloud AIO v2.0.1

{% set isAnyRunning = false %} {% set isAnyRestarting = false %} From abb414129af073db58d11d04f331f26dd9a96d2e Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 5 Sep 2022 14:04:32 +0200 Subject: [PATCH 0015/3949] add a check for init-user-db.sh Signed-off-by: szaimen --- Containers/postgresql/init-user-db.sh | 4 ++++ Containers/postgresql/start.sh | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Containers/postgresql/init-user-db.sh b/Containers/postgresql/init-user-db.sh index 1f09770b..5d4474a2 100644 --- a/Containers/postgresql/init-user-db.sh +++ b/Containers/postgresql/init-user-db.sh @@ -1,9 +1,13 @@ #!/bin/bash set -ex +touch /mnt/data/initdb.failed + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB; ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER"; EOSQL +rm /mnt/data/initdb.failed + set +ex diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh index b2e25a1b..b8563b27 100644 --- a/Containers/postgresql/start.sh +++ b/Containers/postgresql/start.sh @@ -18,6 +18,16 @@ if ! [ -w "$DUMP_DIR" ]; then exit 1 fi +# Check if initdb was successful +if [ -f "/mnt/data/initdb.failed" ]; then + echo "It seems like initializing the database was unsuccessful." + echo "Most likely the timezone is not a valid one." + echo "Please restore a backup, change the timezone to a valid one and try again." + echo "If this is a new instance, clean it properly by following https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance" + echo "Afterwards feel free to try again with a valid timezone." + exit 1 +fi + # Delete the datadir once (needed for setting the correct credentials on old instances once) if ! [ -f "$DUMP_DIR/export.failed" ] && ! [ -f "$DUMP_DIR/initial-cleanup-done" ]; then set -ex @@ -58,6 +68,11 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO # Create new database exec docker-entrypoint.sh postgres & + # Exit if initdb failed + if [ -f "/mnt/data/initdb.failed" ]; then + exit 1 + fi + # Wait for creation while ! nc -z localhost 11000; do echo "Waiting for the database to start." @@ -124,6 +139,11 @@ trap 'true' SIGINT SIGTERM exec docker-entrypoint.sh postgres & wait $! +# Exit if initdb failed +if [ -f "/mnt/data/initdb.failed" ]; then + exit 1 +fi + # Continue with shutdown procedure: do database dump, etc. rm -f "$DUMP_FILE.temp" touch "$DUMP_DIR/export.failed" From 04abdbed9e5e8f2cc28ae15f09a127331e42dcf8 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 5 Sep 2022 12:19:49 +0000 Subject: [PATCH 0016/3949] Yaml updates Signed-off-by: GitHub --- manual-install/latest-arm64.yml | 34 +++++++++++++++++++++++++++++++ manual-install/latest.yml | 36 ++++++++++++++++++++++++++++++++- manual-install/sample.conf | 4 ++++ 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/manual-install/latest-arm64.yml b/manual-install/latest-arm64.yml index 7649fe38..a9753125 100644 --- a/manual-install/latest-arm64.yml +++ b/manual-install/latest-arm64.yml @@ -47,6 +47,8 @@ services: depends_on: - nextcloud-aio-database - nextcloud-aio-redis + - nextcloud-aio-fulltextsearch + - nextcloud-aio-imaginary image: nextcloud/aio-nextcloud:latest-arm64 volumes: - nextcloud_aio_nextcloud:/var/www/html:rw @@ -76,6 +78,12 @@ services: - UPDATE_NEXTCLOUD_APPS=${UPDATE_NEXTCLOUD_APPS} - TZ=${TIMEZONE} - TALK_PORT=${TALK_PORT} + - IMAGINARY_ENABLED=${IMAGINARY_ENABLED} + - IMAGINARY_HOST=nextcloud-aio-imaginary + - PHP_UPLOAD_LIMIT=${NEXTCLOUD_UPLOAD_LIMIT} + - FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED} + - FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch + - PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME} stop_grace_period: 10s restart: unless-stopped networks: @@ -123,6 +131,30 @@ services: networks: - nextcloud-aio + nextcloud-aio-imaginary: + container_name: nextcloud-aio-imaginary + image: nextcloud/aio-imaginary:latest-arm64 + environment: + - TZ=${TIMEZONE} + stop_grace_period: 10s + restart: unless-stopped + networks: + - nextcloud-aio + + nextcloud-aio-fulltextsearch: + container_name: nextcloud-aio-fulltextsearch + image: nextcloud/aio-fulltextsearch:latest-arm64 + environment: + - TZ=${TIMEZONE} + - discovery.type=single-node + - ES_JAVA_OPTS=-Xms1024M -Xmx1024M + volumes: + - nextcloud_aio_elasticsearch:/usr/share/elasticsearch/data:rw + stop_grace_period: 10s + restart: unless-stopped + networks: + - nextcloud-aio + volumes: nextcloud_aio_apache: name: nextcloud_aio_apache @@ -130,6 +162,8 @@ volumes: name: nextcloud_aio_database nextcloud_aio_database_dump: name: nextcloud_aio_database_dump + nextcloud_aio_elasticsearch: + name: nextcloud_aio_elasticsearch nextcloud_aio_nextcloud: name: nextcloud_aio_nextcloud nextcloud_aio_nextcloud_data: diff --git a/manual-install/latest.yml b/manual-install/latest.yml index d7ce9797..ee7e220c 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -6,7 +6,6 @@ services: depends_on: - nextcloud-aio-onlyoffice - nextcloud-aio-collabora - - nextcloud-aio-clamav - nextcloud-aio-talk - nextcloud-aio-nextcloud image: nextcloud/aio-apache:latest @@ -50,6 +49,9 @@ services: depends_on: - nextcloud-aio-database - nextcloud-aio-redis + - nextcloud-aio-clamav + - nextcloud-aio-fulltextsearch + - nextcloud-aio-imaginary image: nextcloud/aio-nextcloud:latest volumes: - nextcloud_aio_nextcloud:/var/www/html:rw @@ -84,6 +86,12 @@ services: - UPDATE_NEXTCLOUD_APPS=${UPDATE_NEXTCLOUD_APPS} - TZ=${TIMEZONE} - TALK_PORT=${TALK_PORT} + - IMAGINARY_ENABLED=${IMAGINARY_ENABLED} + - IMAGINARY_HOST=nextcloud-aio-imaginary + - PHP_UPLOAD_LIMIT=${NEXTCLOUD_UPLOAD_LIMIT} + - FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED} + - FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch + - PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME} stop_grace_period: 10s restart: unless-stopped networks: @@ -157,6 +165,30 @@ services: restart: unless-stopped networks: - nextcloud-aio + + nextcloud-aio-imaginary: + container_name: nextcloud-aio-imaginary + image: nextcloud/aio-imaginary:latest + environment: + - TZ=${TIMEZONE} + stop_grace_period: 10s + restart: unless-stopped + networks: + - nextcloud-aio + + nextcloud-aio-fulltextsearch: + container_name: nextcloud-aio-fulltextsearch + image: nextcloud/aio-fulltextsearch:latest + environment: + - TZ=${TIMEZONE} + - discovery.type=single-node + - ES_JAVA_OPTS=-Xms1024M -Xmx1024M + volumes: + - nextcloud_aio_elasticsearch:/usr/share/elasticsearch/data:rw + stop_grace_period: 10s + restart: unless-stopped + networks: + - nextcloud-aio volumes: nextcloud_aio_apache: @@ -167,6 +199,8 @@ volumes: name: nextcloud_aio_database nextcloud_aio_database_dump: name: nextcloud_aio_database_dump + nextcloud_aio_elasticsearch: + name: nextcloud_aio_elasticsearch nextcloud_aio_nextcloud: name: nextcloud_aio_nextcloud nextcloud_aio_onlyoffice: diff --git a/manual-install/sample.conf b/manual-install/sample.conf index 4aadd825..bdaa4780 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -5,11 +5,15 @@ CLAMAV_ENABLED=no # Setting this to "yes" enables the option in Nextclo 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 COLLABORA_ENABLED=yes # Setting this to "yes" enables the option in Nextcloud automatically. DATABASE_PASSWORD= # TODO! This needs to be a unique and good password! +FULLTEXTSEARCH_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. +IMAGINARY_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. JANUS_API_KEY= # TODO! This needs to be a unique and good password! NC_DOMAIN=yourdomain.com # TODO! Needs to be changed to the domain that you want to use for Nextcloud. NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data # You can change this to e.g. "/mnt/ncdata" to map it to a location on your host. It needs to be adjusted before the first startup and never afterwards! +NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR! NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin". +NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container ONLYOFFICE_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. ONLYOFFICE_SECRET= # TODO! This needs to be a unique and good password! REDIS_PASSWORD= # TODO! This needs to be a unique and good password! From e03e3cfc08f01cb704eca4cc5526418a04407344 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 5 Sep 2022 12:19:49 +0000 Subject: [PATCH 0017/3949] dependency updates Signed-off-by: GitHub --- php/composer.lock | 71 ++++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index 41e9133a..54c083a4 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "guzzlehttp/guzzle", - "version": "7.4.5", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { @@ -32,10 +32,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -45,8 +45,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -112,7 +116,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.5" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -128,20 +132,20 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:13+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -196,7 +200,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -212,20 +216,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "13388f00956b1503577598873fffb5ae994b5737" + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", - "reference": "13388f00956b1503577598873fffb5ae994b5737", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", "shasum": "" }, "require": { @@ -239,15 +243,19 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { "dev-master": "2.4-dev" } @@ -311,7 +319,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.1" }, "funding": [ { @@ -327,7 +335,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:11+00:00" + "time": "2022-08-28T14:45:39+00:00" }, { "name": "http-interop/http-factory-guzzle", @@ -389,25 +397,26 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.2.0", + "version": "v1.2.1", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "09f0e9fb61829f628205b7c94906c28740ff9540" + "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540", - "reference": "09f0e9fb61829f628205b7c94906c28740ff9540", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/d78fd36ba031a1a695ea5a406f29996948d7011b", + "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "pestphp/pest": "^1.18", - "phpstan/phpstan": "^0.12.98", - "symfony/var-dumper": "^5.3" + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" }, "type": "library", "extra": { @@ -444,7 +453,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-05-16T17:09:47+00:00" + "time": "2022-08-26T15:25:27+00:00" }, { "name": "nikic/fast-route", From 06315218b8e177c13700bf80c5a4a69645411aa0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 16:04:45 +0000 Subject: [PATCH 0018/3949] Bump nextcloud/imaginary in /Containers/imaginary Bumps nextcloud/imaginary from 20220822 to 20220905. --- updated-dependencies: - dependency-name: nextcloud/imaginary dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Containers/imaginary/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index af0347b8..64e4f704 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/h2non/imaginary/blob/master/Dockerfile -FROM nextcloud/imaginary:20220822 +FROM nextcloud/imaginary:20220905 USER root RUN set -ex; \ From 0cc5d278fb3f61b257d829c1d5de0ce77b013858 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 07:46:39 +0000 Subject: [PATCH 0019/3949] Bump php in /Containers/nextcloud Bumps php from 8.0.22-fpm-alpine3.16 to 8.0.23-fpm-alpine3.16. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 02267c1b..da792fef 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/nextcloud/docker/blob/master/23/fpm-alpine/Dockerfile -FROM php:8.0.22-fpm-alpine3.16 +FROM php:8.0.23-fpm-alpine3.16 # Custom: change id of www-data user as it needs to be the same like on old installations RUN set -ex; \ From 16c75492f38eb45b1419ce5d40bd3f625223a048 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 07:46:40 +0000 Subject: [PATCH 0020/3949] Bump php in /Containers/mastercontainer Bumps php from 8.0.22-apache-bullseye to 8.0.23-apache-bullseye. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 9b9b764e..af87d0f3 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -5,7 +5,7 @@ FROM docker:20.10.17-dind-alpine3.16 as dind FROM caddy:2.5.2-alpine as caddy # From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile -FROM php:8.0.22-apache-bullseye +FROM php:8.0.23-apache-bullseye EXPOSE 80 EXPOSE 8080 From 80482657bee5aca5622745e8ac62ece0bd3dea22 Mon Sep 17 00:00:00 2001 From: "martin.mueller" Date: Wed, 7 Sep 2022 11:17:53 +0200 Subject: [PATCH 0021/3949] TURN_CONF set total-quota unlimited Signed-off-by: martin.mueller --- Containers/talk/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/talk/start.sh b/Containers/talk/start.sh index eea4563d..dcb53e9d 100644 --- a/Containers/talk/start.sh +++ b/Containers/talk/start.sh @@ -23,7 +23,7 @@ lt-cred-mech use-auth-secret static-auth-secret=$TURN_SECRET realm=$NC_DOMAIN -total-quota=100 +total-quota=0 bps-capacity=0 stale-nonce no-multicast-peers From 46b1a0c068419a32844002a86b81ae7ed48ca239 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 8 Sep 2022 12:50:47 +0000 Subject: [PATCH 0022/3949] nextcloud-update automated change Signed-off-by: GitHub --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index da792fef..8e0092ac 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -107,7 +107,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 24.0.4 +ENV NEXTCLOUD_VERSION 24.0.5 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ From 4ecfaa065007794a911e8370886aa762c7746e35 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 8 Sep 2022 16:15:16 +0200 Subject: [PATCH 0023/3949] increase to 2.0.2 Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 0749482e..2b29c025 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.0.1

+

Nextcloud AIO v2.0.2

{% set isAnyRunning = false %} {% set isAnyRestarting = false %} From feb6438d39424b9f37d6c4a71952115c5bce4e30 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 8 Sep 2022 17:26:36 +0200 Subject: [PATCH 0024/3949] Revert "add a check for init-user-db.sh" Signed-off-by: szaimen --- Containers/postgresql/init-user-db.sh | 4 ---- Containers/postgresql/start.sh | 20 -------------------- 2 files changed, 24 deletions(-) diff --git a/Containers/postgresql/init-user-db.sh b/Containers/postgresql/init-user-db.sh index 5d4474a2..1f09770b 100644 --- a/Containers/postgresql/init-user-db.sh +++ b/Containers/postgresql/init-user-db.sh @@ -1,13 +1,9 @@ #!/bin/bash set -ex -touch /mnt/data/initdb.failed - psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB; ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER"; EOSQL -rm /mnt/data/initdb.failed - set +ex diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh index b8563b27..b2e25a1b 100644 --- a/Containers/postgresql/start.sh +++ b/Containers/postgresql/start.sh @@ -18,16 +18,6 @@ if ! [ -w "$DUMP_DIR" ]; then exit 1 fi -# Check if initdb was successful -if [ -f "/mnt/data/initdb.failed" ]; then - echo "It seems like initializing the database was unsuccessful." - echo "Most likely the timezone is not a valid one." - echo "Please restore a backup, change the timezone to a valid one and try again." - echo "If this is a new instance, clean it properly by following https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance" - echo "Afterwards feel free to try again with a valid timezone." - exit 1 -fi - # Delete the datadir once (needed for setting the correct credentials on old instances once) if ! [ -f "$DUMP_DIR/export.failed" ] && ! [ -f "$DUMP_DIR/initial-cleanup-done" ]; then set -ex @@ -68,11 +58,6 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO # Create new database exec docker-entrypoint.sh postgres & - # Exit if initdb failed - if [ -f "/mnt/data/initdb.failed" ]; then - exit 1 - fi - # Wait for creation while ! nc -z localhost 11000; do echo "Waiting for the database to start." @@ -139,11 +124,6 @@ trap 'true' SIGINT SIGTERM exec docker-entrypoint.sh postgres & wait $! -# Exit if initdb failed -if [ -f "/mnt/data/initdb.failed" ]; then - exit 1 -fi - # Continue with shutdown procedure: do database dump, etc. rm -f "$DUMP_FILE.temp" touch "$DUMP_DIR/export.failed" From 3ac6fc590acafbc24b0ee871f207bb121465055f Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 8 Sep 2022 17:33:33 +0200 Subject: [PATCH 0025/3949] add a confirmation for the timezone Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 2b29c025..5172ef2f 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -538,7 +538,7 @@ - + You need to make sure that the timezone that you enter is valid. An example is Europe/Berlin. You can get valid values by looking at the 'TZ database name' column of this list: click here.

{% else %} From 609cabf9dc01929bf3340aa72560f1e503318bba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 12:31:14 +0000 Subject: [PATCH 0026/3949] Bump debian in /Containers/apache Bumps debian from bullseye-20220822-slim to bullseye-20220912-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index 22576972..c60aadad 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,7 +1,7 @@ # Caddy is a requirement FROM caddy:2.5.2-alpine as caddy -FROM debian:bullseye-20220822-slim +FROM debian:bullseye-20220912-slim RUN mkdir -p /mnt/data; \ chown www-data:www-data /mnt/data; From 319bda83e8dc8abdfa80bd0cac8833a270269dcd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 12:31:15 +0000 Subject: [PATCH 0027/3949] Bump debian in /Containers/borgbackup Bumps debian from bullseye-20220822-slim to bullseye-20220912-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/borgbackup/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index ef3b89a7..8327f3a2 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-20220822-slim +FROM debian:bullseye-20220912-slim RUN set -ex; \ \ From 935d4aab1114f5fcf43ad0f4277b20c2d9ae8edf Mon Sep 17 00:00:00 2001 From: Lorenzo Marroccoli Date: Wed, 31 Aug 2022 22:50:19 +0200 Subject: [PATCH 0028/3949] Let the Nextcloud-Container trust custom CAs (e.g. for using LDAPS) 2 Signed-off-by: Lorenzo Marroccoli Signed-off-by: szaimen Co-Authored-By: Simon L. --- Containers/mastercontainer/start.sh | 8 ++++++++ Containers/nextcloud/start.sh | 6 ++++++ docker-compose.yml | 1 + manual-install/update-yaml.sh | 1 + php/containers.json | 8 +++++++- php/src/ContainerDefinitionFetcher.php | 5 +++++ php/src/Data/ConfigurationManager.php | 7 +++++++ php/src/Docker/DockerActionManager.php | 2 ++ readme.md | 9 +++++++++ tests/QA/060-environmental-variables.md | 2 ++ 10 files changed, 48 insertions(+), 1 deletion(-) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index fc613b73..c57b4207 100755 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -161,6 +161,14 @@ It is set to '$DOCKER_SOCKET_PATH'." exit 1 fi fi +if [ -n "$TRUSTED_CACERTS_DIR" ]; then + if ! echo "$TRUSTED_CACERTS_DIR" | grep -q "^/" || echo "$TRUSTED_CACERTS_DIR" | grep -q "/$"; then + echo "You've set TRUSTED_CACERTS_DIR but not to an allowed value. +It should be an absolute path to a directory that starts with '/' but not end with '/'. +It is set to '$TRUSTED_CACERTS_DIR '." + exit 1 + fi +fi # Check DNS resolution # Prevents issues like https://github.com/nextcloud/all-in-one/discussions/565 diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 92cef7f8..8b7e8d97 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -22,6 +22,12 @@ if [ -f "/var/www/html/config/config.php" ]; then # sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php fi +# Trust additional Cacerts, if the user provided $TRUSTED_CACERTS_DIR +if [ -n "$TRUSTED_CACERTS_DIR" ]; then + echo "User required to trust additional CA certificates, running 'update-ca-certificates." + update-ca-certificates +fi + # Run original entrypoint if ! bash /entrypoint.sh; then exit 1 diff --git a/docker-compose.yml b/docker-compose.yml index 42688d0c..d96afc08 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,7 @@ services: # - DISABLE_BACKUP_SECTION=true # Setting this to true allows to hide the backup section in the AIO interface. # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud + # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca) # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 3cf23451..564891cf 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -64,6 +64,7 @@ sed -i 's|NEXTCLOUD_DATADIR=|NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data sed -i 's|NEXTCLOUD_MOUNT=|NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR!|' sample.conf sed -i 's|NEXTCLOUD_UPLOAD_LIMIT=|NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container|' sample.conf sed -i 's|NEXTCLOUD_MAX_TIME=|NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container|' sample.conf +sed -i 's|TRUSTED_CACERTS_DIR=|TRUSTED_CACERTS_DIR=/path/to/my/cacerts # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.|' sample.conf sed -i 's|UPDATE_NEXTCLOUD_APPS=|UPDATE_NEXTCLOUD_APPS=no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays.|' sample.conf sed -i 's|APACHE_PORT=|APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy.|' sample.conf sed -i 's|TALK_PORT=|TALK_PORT=3478 # This allows to adjust the port that the talk container is using.|' sample.conf diff --git a/php/containers.json b/php/containers.json index 879c4521..1efbaa14 100644 --- a/php/containers.json +++ b/php/containers.json @@ -112,6 +112,11 @@ "name": "%NEXTCLOUD_MOUNT%", "location": "%NEXTCLOUD_MOUNT%", "writeable": true + }, + { + "name": "%TRUSTED_CACERTS_DIR%", + "location": "/usr/local/share/ca-certificates", + "writeable": false } ], "environmentVariables": [ @@ -148,7 +153,8 @@ "PHP_UPLOAD_LIMIT=%NEXTCLOUD_UPLOAD_LIMIT%", "FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%", "FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch", - "PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%" + "PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%", + "TRUSTED_CACERTS_DIR=%TRUSTED_CACERTS_DIR%" ], "maxShutdownTime": 10, "restartPolicy": "unless-stopped" diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 15e84b1e..e6d416ef 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -120,6 +120,11 @@ class ContainerDefinitionFetcher if($value['name'] === '') { continue; } + } elseif ($value['name'] === '%TRUSTED_CACERTS_DIR%') { + $value['name'] = $this->configurationManager->GetTrustedCacertsDir(); + if($value['name'] === '') { + continue; + } } if ($value['location'] === '%NEXTCLOUD_MOUNT%') { $value['location'] = $this->configurationManager->GetNextcloudMount(); diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 2ebcf53e..c19a747d 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -538,6 +538,13 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } + public function GetTrustedCacertsDir() : string { + $envVariableName = 'TRUSTED_CACERTS_DIR'; + $configName = 'trusted_cacerts_dir'; + $defaultValue = ''; + return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + } + /** * @throws InvalidSettingConfigurationException */ diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 74cb4a96..2682ef15 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -314,6 +314,8 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetNextcloudUploadLimit(); } elseif ($out[1] === 'NEXTCLOUD_MAX_TIME') { $replacements[1] = $this->configurationManager->GetNextcloudMaxTime(); + } elseif ($out[1] === 'TRUSTED_CACERTS_DIR') { + $replacements[1] = $this->configurationManager->GetTrustedCacertsDir(); } elseif ($out[1] === 'ADDITIONAL_DIRECTORIES_BACKUP') { if ($this->configurationManager->GetAdditionalBackupDirectoriesString() !== '') { $replacements[1] = 'yes'; diff --git a/readme.md b/readme.md index d564caef..f671edeb 100644 --- a/readme.md +++ b/readme.md @@ -490,3 +490,12 @@ What are the requirements? 3. The feature that gets added into Nextcloud by adding the container must be maintained by the Nextcloud GmbH. 4. It must be possible to run the container without big quirks inside docker containers. Big quirks means e.g. needing to change the capabilities or security options. 5. The container should not mount directories from the host into the container: only docker volumes should be used. + +### How to trust user-defiend Certification Authorities (CA)? +For some applications it might be necessary to enstablish a secured connection to a host / server which is using a certificated issued by a Certification Authority that is not trusted out of the box. An example could be configuring LDAPS against the Domain Controller (ActiveDirectory) of an organization + +You can make the Nextcloud container trust any Certification Authority by providing the environmental variable `TRUSTED_CACERTS_DIR` when starting the AIO-mastercontainer. The value of the variables should be set to the absolute path to a directory on the host, which contains one or more Certification Authority's certificate. You should use X.509 certificates, Base64 encoded. (Other formats may work but have not been tested!) All the certificates in the directory will be trusted. + +When using `docker run`, the environmental variable can be set with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`. + +In order for the value to be valid, the path should start with `/` and not end with '/' and point to an existing **directory**. Pointing the variable directly to a certificate **file** will not work and may also break things. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index 8cff4438..faf636d2 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -11,5 +11,7 @@ - [ ] When starting the mastercontainer with `-e NEXTCLOUD_MAX_TIME=4000` it should change Nextclouds upload max time 4000s. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud for allowed values. - [ ] When starting the mastercontainer with `-e DOCKER_SOCKET_PATH="/var/run/docker.sock.raw"` it should map `/var/run/docker.sock.raw` to `/var/run/docker.sock` inside the watchtower container which allow to update the mastercontainer on macos and with docker rootless. - [ ] When starting the mastercontainer with `-e DISABLE_BACKUP_SECTION=true` it should hide the backup section that gets shown after AIO is set up (everything of [020-backup-and-restore](./020-backup-and-restore.md)) and simply show that the backup section is disabled. +- [ ] When starting the mastercontainer with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. +See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca) You can now continue with [070-timezone-change.md](./070-timezone-change.md) From e91a3d7bce4b3a9a68cab8725e15561dac20bec1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 12:39:08 +0000 Subject: [PATCH 0029/3949] Bump collabora/code in /Containers/collabora Bumps collabora/code from 22.05.5.4.1 to 22.05.6.1.1. --- updated-dependencies: - dependency-name: collabora/code dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/collabora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 0873e2dc..9b51b412 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -1,5 +1,5 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker -FROM collabora/code:22.05.5.4.1 +FROM collabora/code:22.05.6.1.1 USER root From 7efa09339c988475ef6ed378e5a5c1cc9650b332 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 19 Sep 2022 12:24:35 +0000 Subject: [PATCH 0030/3949] dependency updates Signed-off-by: GitHub --- Containers/mastercontainer/Dockerfile | 2 +- php/composer.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index af87d0f3..d9840130 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -37,7 +37,7 @@ COPY --from=dind /usr/local/bin/docker /usr/local/bin/ RUN chmod +x /usr/local/bin/docker RUN set -ex; \ - pecl install APCu-5.1.21; \ + pecl install APCu-5.1.22; \ docker-php-ext-enable apcu RUN set -e && \ diff --git a/php/composer.lock b/php/composer.lock index 54c083a4..f1f66951 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -397,16 +397,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.2.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b" + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/d78fd36ba031a1a695ea5a406f29996948d7011b", - "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", "shasum": "" }, "require": { @@ -453,7 +453,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-08-26T15:25:27+00:00" + "time": "2022-09-08T13:45:54+00:00" }, { "name": "nikic/fast-route", From 544f38a882f323d32955b357764de393b1b36919 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 12:51:35 +0000 Subject: [PATCH 0031/3949] Bump nextcloud/imaginary in /Containers/imaginary Bumps nextcloud/imaginary from 20220905 to 20220919. --- updated-dependencies: - dependency-name: nextcloud/imaginary dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Containers/imaginary/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index 64e4f704..c9cdecea 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/h2non/imaginary/blob/master/Dockerfile -FROM nextcloud/imaginary:20220905 +FROM nextcloud/imaginary:20220919 USER root RUN set -ex; \ From 93f1f9c47ea244736374c5c0b873bb3413fb9991 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 19 Sep 2022 12:57:18 +0000 Subject: [PATCH 0032/3949] nextcloud-update automated change Signed-off-by: GitHub --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 8e0092ac..332444cf 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -61,7 +61,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.21; \ + pecl install APCu-5.1.22; \ pecl install memcached-3.2.0; \ pecl install redis-5.3.7; \ pecl install imagick-3.7.0; \ From 18227536cdf7a7789b5f3482f9dab0368b67b3a2 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 18 Sep 2022 23:26:06 +0200 Subject: [PATCH 0033/3949] fix removal of the updatenotification app for migrated instances Signed-off-by: szaimen --- Containers/nextcloud/entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index afa6bb4b..b142cadb 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -135,8 +135,11 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then php /var/www/html/occ app:update --all # Fix removing the updatenotification for old instances + UPDATENOTIFICATION_STATUS="$(php /var/www/html/occ config:app:get updatenotification enabled)" if [ -d "/var/www/html/apps/updatenotification" ]; then php /var/www/html/occ app:disable updatenotification + elif [ "$UPDATENOTIFICATION_STATUS" != "no" ] && [ -n "$UPDATENOTIFICATION_STATUS" ]; then + php /var/www/html/occ config:app:set updatenotification enabled --value="no" fi fi From 6e2872b9538ef82a9480a6ea91ed2d98e727e47e Mon Sep 17 00:00:00 2001 From: Mustapha Zorgati <15628173+mustaphazorgati@users.noreply.github.com> Date: Mon, 19 Sep 2022 23:43:42 +0200 Subject: [PATCH 0034/3949] aio-apache configuration now uses NEXTCLOUD_HOST env variable (#1173) instead of hardcoded container name --- Containers/apache/nextcloud.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index d701a264..15bc63c8 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -2,7 +2,7 @@ Listen 8000 # PHP match - SetHandler "proxy:fcgi://nextcloud-aio-nextcloud:9000" + SetHandler "proxy:fcgi://${NEXTCLOUD_HOST}:9000" # Nextcloud dir DocumentRoot /var/www/html/ From 2b5deb81f5656be6db4198b57d1dbe963185bf9b Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 20 Sep 2022 18:16:17 +0200 Subject: [PATCH 0035/3949] bring Apache limits in sync with PHP limits Signed-off-by: szaimen --- Containers/apache/nextcloud.conf | 8 +++++++- manual-install/update-yaml.sh | 1 + php/containers.json | 4 +++- php/src/Data/ConfigurationManager.php | 5 +++++ php/src/Docker/DockerActionManager.php | 2 ++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index d701a264..530d26ff 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -26,5 +26,11 @@ Listen 8000 SetEnv proxy-sendcl 1 # See https://httpd.apache.org/docs/current/en/mod/core.html#limitrequestbody - LimitRequestBody 0 + LimitRequestBody ${APACHE_MAX_SIZE} + + # See https://httpd.apache.org/docs/current/mod/core.html#timeout + Timeout ${APACHE_MAX_TIME} + + # See https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxytimeout + ProxyTimeout ${APACHE_MAX_TIME} diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 3cf23451..65a6c347 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -63,6 +63,7 @@ sed -i 's|COLLABORA_DICTIONARIES=|COLLABORA_DICTIONARIES=de_DE en_GB en_US es_ES sed -i 's|NEXTCLOUD_DATADIR=|NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data # You can change this to e.g. "/mnt/ncdata" to map it to a location on your host. It needs to be adjusted before the first startup and never afterwards!|' sample.conf sed -i 's|NEXTCLOUD_MOUNT=|NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR!|' sample.conf sed -i 's|NEXTCLOUD_UPLOAD_LIMIT=|NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container|' sample.conf +sed -i 's|APACHE_MAX_SIZE=|APACHE_MAX_SIZE=10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT|' sample.conf sed -i 's|NEXTCLOUD_MAX_TIME=|NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container|' sample.conf sed -i 's|UPDATE_NEXTCLOUD_APPS=|UPDATE_NEXTCLOUD_APPS=no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays.|' sample.conf sed -i 's|APACHE_PORT=|APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy.|' sample.conf diff --git a/php/containers.json b/php/containers.json index 879c4521..1bf889c7 100644 --- a/php/containers.json +++ b/php/containers.json @@ -24,7 +24,9 @@ "TALK_HOST=nextcloud-aio-talk", "APACHE_PORT=%APACHE_PORT%", "ONLYOFFICE_HOST=nextcloud-aio-onlyoffice", - "TZ=%TIMEZONE%" + "TZ=%TIMEZONE%", + "APACHE_MAX_SIZE=%APACHE_MAX_SIZE%", + "APACHE_MAX_TIME=%NEXTCLOUD_MAX_TIME%" ], "volumes": [ { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 2ebcf53e..a656c84c 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -524,6 +524,11 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } + public function GetApacheMaxSize() : int { + $uploadLimit = (int)rtrim($this->GetNextcloudUploadLimit(), 'G'); + return $uploadLimit * 1024 * 1024 * 1024; + } + public function GetNextcloudMaxTime() : string { $envVariableName = 'NEXTCLOUD_MAX_TIME'; $configName = 'nextcloud_max_time'; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 74cb4a96..f02e1277 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -322,6 +322,8 @@ class DockerActionManager } } elseif ($out[1] === 'BORGBACKUP_HOST_LOCATION') { $replacements[1] = $this->configurationManager->GetBorgBackupHostLocation(); + } elseif ($out[1] === 'APACHE_MAX_SIZE') { + $replacements[1] = $this->configurationManager->GetApacheMaxSize(); } else { $replacements[1] = $this->configurationManager->GetSecret($out[1]); } From 1e8d5c71f4f6977df65ec626c3e895881d1af572 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 20 Sep 2022 16:33:43 +0200 Subject: [PATCH 0036/3949] update permissions output and fix usage of variable Signed-off-by: szaimen --- Containers/nextcloud/entrypoint.sh | 43 +++++++++++++++++------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index afa6bb4b..2ac9a22b 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -29,13 +29,20 @@ if [ -n "$PHP_MAX_CHILDREN" ]; then fi # Check permissions in ncdata -touch "/mnt/ncdata/this-is-a-test-file" -if ! [ -f "/mnt/ncdata/this-is-a-test-file" ]; then - echo "The www-data user doesn't seem to have access rights in /mnt/ncdata. -Did you maybe change the datadir and did forget to apply the correct permissions?" +touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null +if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then + echo "The www-data user doesn't seem to have access rights in the datadir. +Did you maybe change the datadir and did forget to apply the correct permissions? +See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir +The found permissions are: +$(stat -c "%u:%g %a" "$NEXTCLOUD_DATA_DIR") +(userID:groupID permissions) +but they should be: +33:0 750 +(userID:groupID permissions)" exit 1 fi -rm "/mnt/ncdata/this-is-a-test-file" +rm "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 @@ -65,7 +72,7 @@ if [ -f "/var/www/html/lib/versioncheck.php" ] && ! php /var/www/html/lib/versio fi # Do not start the container if the last update failed -if [ -f "/mnt/ncdata/update.failed" ]; then +if [ -f "$NEXTCLOUD_DATA_DIR/update.failed" ]; then echo "The last Nextcloud update failed." echo "Please restore from backup and try again!" echo "If you do not have a backup in place, you can simply delete the update.failed file in the datadir which will allow the container to start again." @@ -73,7 +80,7 @@ if [ -f "/mnt/ncdata/update.failed" ]; then fi # Skip any update if Nextcloud was just restored -if ! [ -f "/mnt/ncdata/skip.update" ]; then +if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then if version_greater "$image_version" "$installed_version"; then # Check if it skips a major version INSTALLED_MAJOR="${installed_version%%.*}" @@ -228,7 +235,7 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then #upgrade else - touch "/mnt/ncdata/update.failed" + touch "$NEXTCLOUD_DATA_DIR/update.failed" while [ -n "$(pgrep -f cron.php)" ] do echo "Waiting for Nextclouds cronjob to finish..." @@ -242,7 +249,7 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then exit 1 fi - rm "/mnt/ncdata/update.failed" + rm "$NEXTCLOUD_DATA_DIR/update.failed" bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info." php /var/www/html/occ app:list | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after @@ -273,24 +280,24 @@ fi # Check if appdata is present # If not, something broke (e.g. changing ncdatadir after aio was first started) -if [ -z "$(find "/mnt/ncdata/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ]; then +if [ -z "$(find "$NEXTCLOUD_DATA_DIR/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ]; then echo "Appdata is not present. Did you maybe change the datadir after aio was first started?" exit 1 fi # Configure tempdirectory if [ -z "$OBJECTSTORE_S3_BUCKET" ] && [ -z "$OBJECTSTORE_SWIFT_URL" ]; then - mkdir -p "/mnt/ncdata/tmp/" + mkdir -p "$NEXTCLOUD_DATA_DIR/tmp/" if ! grep -q upload_tmp_dir /usr/local/etc/php/conf.d/nextcloud.ini; then - echo "upload_tmp_dir = /mnt/ncdata/tmp/" >> /usr/local/etc/php/conf.d/nextcloud.ini + echo "upload_tmp_dir = $NEXTCLOUD_DATA_DIR/tmp/" >> /usr/local/etc/php/conf.d/nextcloud.ini fi - php /var/www/html/occ config:system:set tempdirectory --value="/mnt/ncdata/tmp/" + php /var/www/html/occ config:system:set tempdirectory --value="$NEXTCLOUD_DATA_DIR/tmp/" fi # Perform fingerprint update if instance was restored -if [ -f "/mnt/ncdata/fingerprint.update" ]; then +if [ -f "$NEXTCLOUD_DATA_DIR/fingerprint.update" ]; then php /var/www/html/occ maintenance:data-fingerprint - rm "/mnt/ncdata/fingerprint.update" + rm "$NEXTCLOUD_DATA_DIR/fingerprint.update" fi # Apply one-click-instance settings @@ -466,12 +473,12 @@ if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":\"1\",\"files_office\":\"1\"}" # Do the index - if ! [ -f "/mnt/ncdata/fts-index.done" ]; then + if ! [ -f "$NEXTCLOUD_DATA_DIR/fts-index.done" ]; then echo "Waiting 10s before activating FTS..." sleep 10 echo "Activating fulltextsearch..." if php /var/www/html/occ fulltextsearch:test && php /var/www/html/occ fulltextsearch:index; then - touch "/mnt/ncdata/fts-index.done" + touch "$NEXTCLOUD_DATA_DIR/fts-index.done" else echo "Fulltextsearch failed. Could not index." fi @@ -489,4 +496,4 @@ else fi # Remove the update skip file always -rm -f /mnt/ncdata/skip.update +rm -f "$NEXTCLOUD_DATA_DIR"/skip.update From 8dd871b3682768cb11bbe6ffec0651c9c5a11f13 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 20 Sep 2022 18:56:22 +0200 Subject: [PATCH 0037/3949] add logging to apache Signed-off-by: szaimen --- Containers/apache/nextcloud.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index d701a264..75758be8 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -1,5 +1,9 @@ Listen 8000 + # Add error log + CustomLog ${APACHE_LOG_DIR}/access.log combined + ErrorLog ${APACHE_LOG_DIR}/error.log + # PHP match SetHandler "proxy:fcgi://nextcloud-aio-nextcloud:9000" From 7e148f828771242982f76e21347fdad0692b3fd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 17:04:05 +0000 Subject: [PATCH 0038/3949] Bump docker in /Containers/mastercontainer Bumps docker from 20.10.17-dind-alpine3.16 to 20.10.18-dind-alpine3.16. --- updated-dependencies: - dependency-name: docker dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index af87d0f3..8f82e030 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -1,5 +1,5 @@ # Docker CLI is a requirement -FROM docker:20.10.17-dind-alpine3.16 as dind +FROM docker:20.10.18-dind-alpine3.16 as dind # Caddy is a requirement FROM caddy:2.5.2-alpine as caddy From 4397e74ca948f1602e81f79a5bdb9f3b99207403 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 18 Sep 2022 23:10:03 +0200 Subject: [PATCH 0039/3949] small enhancements Signed-off-by: szaimen --- Containers/mastercontainer/daily-backup.sh | 4 +++- readme.md | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Containers/mastercontainer/daily-backup.sh b/Containers/mastercontainer/daily-backup.sh index 8f6ecb6a..907b0df3 100644 --- a/Containers/mastercontainer/daily-backup.sh +++ b/Containers/mastercontainer/daily-backup.sh @@ -80,7 +80,9 @@ fi # Delete the lock file rm -f "/mnt/docker-aio-config/data/daily_backup_running" -if [ "$DAILY_BACKUP" = 1 ]; then +# Send backup notification +# shellcheck disable=SC2235 +if [ "$DAILY_BACKUP" = 1 ] && ([ "$AUTOMATIC_UPDATES" = 1 ] || [ "$START_CONTAINERS" = 1 ]); then # Wait for the nextcloud container to start and send if the backup was successful if ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-nextcloud$"; then echo "Something seems to be wrong: Nextcloud should be started at this step." diff --git a/readme.md b/readme.md index d564caef..3bb6add4 100644 --- a/readme.md +++ b/readme.md @@ -378,13 +378,15 @@ Afterwards apply the correct permissions with `sudo chown root:root /root/backup ### How to stop/start/update containers or trigger the daily backup from a script externally? You can do so by running the `/daily-backup.sh` script that is stored in the mastercontainer. It accepts the following environmental varilables: - `AUTOMATIC_UPDATES` if set to `1`, it will automatically stop the containers, update them and start them including the mastercontainer. If the mastercontainer gets updated, this script's execution will stop as soon as the mastercontainer gets stopped. You can then wait until it is started again and run the script with this flag again in order to update all containers correctly afterwards. -- `DAILY_BACKUP` if set to `1`, it will automatically stop the containers and create a backup. If you want to start them again afterwards, you may have a look at the `START_CONTAINERS` option. Please be aware that this option is non-blocking which means that the backup is not done when the process is finished since it only start the borgbackup container with the correct configuration. +- `DAILY_BACKUP` if set to `1`, it will automatically stop the containers and create a backup. If you want to start them again afterwards, you may have a look at the `START_CONTAINERS` option. Please be aware that this option is non-blocking if `START_CONTAINERS` and `AUTOMATIC_UPDATES` is not enabled at the same time which means that the backup check is not done when the process is finished since it only start the borgbackup container with the correct configuration. - `START_CONTAINERS` if set to `1`, it will automatically start the containers without updating them. - `STOP_CONTAINERS` if set to `1`, it will automatically stop the containers. -- `CHECK_BACKUP` if set to `1`, it will start the backup check. This is not allowed to be enabled at the same time like `DAILY_BACKUP`. +- `CHECK_BACKUP` if set to `1`, it will start the backup check. This is not allowed to be enabled at the same time like `DAILY_BACKUP`. Please be aware that this option is non-blocking which means that the backup check is not done when the process is finished since it only start the borgbackup container with the correct configuration. One example for this would be `sudo docker exec -it -e DAILY_BACKUP=1 nextcloud-aio-mastercontainer /daily-backup.sh`, which you can run via a cronjob or put it in a script. +⚠️ Please note that none of the option returns error codes. So you need to check for the correct result yourself. + ### How to disable the backup section? If you already have a backup solution in place, you may want to hide the backup section. You can do so by adding `-e DISABLE_BACKUP_SECTION=true` to the initial startup of the mastercontainer. From 4e8c1e53ee2a804622c5553bd1afcbaa5606507d Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 14 Sep 2022 11:21:23 +0200 Subject: [PATCH 0040/3949] allow to disable seccomp for collabora Signed-off-by: szaimen --- docker-compose.yml | 1 + manual-install/update-yaml.sh | 1 + php/containers.json | 2 +- php/src/Data/ConfigurationManager.php | 15 +++++++++++++++ php/src/Docker/DockerActionManager.php | 2 ++ readme.md | 3 +++ tests/QA/060-environmental-variables.md | 1 + 7 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d96afc08..269dd992 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,6 +27,7 @@ services: # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca) + # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index cf419f2a..3cbc708e 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -74,6 +74,7 @@ sed -i 's|AIO_URL=|AIO_URL=localhost # Has no function but needs to be sed -i 's|NC_DOMAIN=|NC_DOMAIN=yourdomain.com # TODO! Needs to be changed to the domain that you want to use for Nextcloud.|' sample.conf 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|=$|= # TODO! This needs to be a unique and good password!|' sample.conf cat sample.conf diff --git a/php/containers.json b/php/containers.json index 2498a2bc..50fe1d1e 100644 --- a/php/containers.json +++ b/php/containers.json @@ -193,7 +193,7 @@ ], "environmentVariables": [ "aliasgroup1=https://%NC_DOMAIN%:443", - "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true", + "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true %COLLABORA_SECCOMP_POLICY%", "dictionaries=%COLLABORA_DICTIONARIES%", "TZ=%TIMEZONE%" ], diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index b7bb37d5..a816e4f4 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -550,6 +550,21 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } + public function GetCollaboraSeccompPolicy() : string { + $defaultString = '--o:security.seccomp='; + if ($this->GetCollaboraSeccompDisabledState() !== 'true') { + return $defaultString . 'true'; + } + return $defaultString . 'false'; + } + + private function GetCollaboraSeccompDisabledState() : string { + $envVariableName = 'COLLABORA_SECCOMP_DISABLED'; + $configName = 'collabora_seccomp_disabled'; + $defaultValue = 'false'; + return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + } + /** * @throws InvalidSettingConfigurationException */ diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 4b1e0682..19fa4789 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -326,6 +326,8 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetBorgBackupHostLocation(); } elseif ($out[1] === 'APACHE_MAX_SIZE') { $replacements[1] = $this->configurationManager->GetApacheMaxSize(); + } elseif ($out[1] === 'COLLABORA_SECCOMP_POLICY') { + $replacements[1] = $this->configurationManager->GetCollaboraSeccompPolicy(); } else { $replacements[1] = $this->configurationManager->GetSecret($out[1]); } diff --git a/readme.md b/readme.md index f671edeb..5f43a80d 100644 --- a/readme.md +++ b/readme.md @@ -499,3 +499,6 @@ You can make the Nextcloud container trust any Certification Authority by provid When using `docker run`, the environmental variable can be set with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`. In order for the value to be valid, the path should start with `/` and not end with '/' and point to an existing **directory**. Pointing the variable directly to a certificate **file** will not work and may also break things. + +### How to disable Collabora's Seccomp feature? +The Collabora container enables Seccomp by default, which is a security feature of the Linux kernel. On systems without this kernel feature enabled, you need to provide `-e COLLABORA_SECCOMP_DISABLED=true` to the initial docker run command in order to make it work. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index faf636d2..194f61b2 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -13,5 +13,6 @@ - [ ] When starting the mastercontainer with `-e DISABLE_BACKUP_SECTION=true` it should hide the backup section that gets shown after AIO is set up (everything of [020-backup-and-restore](./020-backup-and-restore.md)) and simply show that the backup section is disabled. - [ ] When starting the mastercontainer with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca) +- [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. You can now continue with [070-timezone-change.md](./070-timezone-change.md) From ef0361dd29543451ad694f24e72a9886de50fca1 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 20 Sep 2022 20:05:10 +0200 Subject: [PATCH 0041/3949] increase to 2.0.3 Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 5172ef2f..0bee9d6c 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.0.2

+

Nextcloud AIO v2.0.3

{% set isAnyRunning = false %} {% set isAnyRestarting = false %} From e0a52df781ab6261790926e45a9b2c71ac109744 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 20 Sep 2022 20:44:13 +0200 Subject: [PATCH 0042/3949] fix link Signed-off-by: szaimen --- docker-compose.yml | 2 +- tests/QA/060-environmental-variables.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 269dd992..f047f341 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: # - DISABLE_BACKUP_SECTION=true # Setting this to true allows to hide the backup section in the AIO interface. # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud - # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca) + # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index 194f61b2..323c236e 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -12,7 +12,7 @@ - [ ] When starting the mastercontainer with `-e DOCKER_SOCKET_PATH="/var/run/docker.sock.raw"` it should map `/var/run/docker.sock.raw` to `/var/run/docker.sock` inside the watchtower container which allow to update the mastercontainer on macos and with docker rootless. - [ ] When starting the mastercontainer with `-e DISABLE_BACKUP_SECTION=true` it should hide the backup section that gets shown after AIO is set up (everything of [020-backup-and-restore](./020-backup-and-restore.md)) and simply show that the backup section is disabled. - [ ] When starting the mastercontainer with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. -See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca) +See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. You can now continue with [070-timezone-change.md](./070-timezone-change.md) From 073f5e18e3a9830fbe04a7da76d00d1868ffd415 Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 21 Sep 2022 12:23:29 +0000 Subject: [PATCH 0043/3949] Yaml updates Signed-off-by: GitHub --- manual-install/latest-arm64.yml | 6 +++++- manual-install/latest.yml | 6 +++++- manual-install/sample.conf | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/manual-install/latest-arm64.yml b/manual-install/latest-arm64.yml index a9753125..c2f52fb4 100644 --- a/manual-install/latest-arm64.yml +++ b/manual-install/latest-arm64.yml @@ -17,6 +17,8 @@ services: - TALK_HOST=nextcloud-aio-talk - APACHE_PORT=${APACHE_PORT} - TZ=${TIMEZONE} + - APACHE_MAX_SIZE=${APACHE_MAX_SIZE} + - APACHE_MAX_TIME=${NEXTCLOUD_MAX_TIME} volumes: - nextcloud_aio_nextcloud:/var/www/html:ro - nextcloud_aio_apache:/mnt/data:rw @@ -54,6 +56,7 @@ services: - nextcloud_aio_nextcloud:/var/www/html:rw - ${NEXTCLOUD_DATADIR}:/mnt/ncdata:rw - ${NEXTCLOUD_MOUNT}:${NEXTCLOUD_MOUNT}:rw + - ${TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro environment: - POSTGRES_HOST=nextcloud-aio-database - POSTGRES_PASSWORD=${DATABASE_PASSWORD} @@ -84,6 +87,7 @@ services: - FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED} - FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch - PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME} + - TRUSTED_CACERTS_DIR=${TRUSTED_CACERTS_DIR} stop_grace_period: 10s restart: unless-stopped networks: @@ -105,7 +109,7 @@ services: image: nextcloud/aio-collabora:latest-arm64 environment: - aliasgroup1=https://${NC_DOMAIN}:443 - - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true + - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true ${COLLABORA_SECCOMP_POLICY} - dictionaries=${COLLABORA_DICTIONARIES} - TZ=${TIMEZONE} stop_grace_period: 10s diff --git a/manual-install/latest.yml b/manual-install/latest.yml index ee7e220c..0d652f68 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -19,6 +19,8 @@ services: - APACHE_PORT=${APACHE_PORT} - ONLYOFFICE_HOST=nextcloud-aio-onlyoffice - TZ=${TIMEZONE} + - APACHE_MAX_SIZE=${APACHE_MAX_SIZE} + - APACHE_MAX_TIME=${NEXTCLOUD_MAX_TIME} volumes: - nextcloud_aio_nextcloud:/var/www/html:ro - nextcloud_aio_apache:/mnt/data:rw @@ -57,6 +59,7 @@ services: - nextcloud_aio_nextcloud:/var/www/html:rw - ${NEXTCLOUD_DATADIR}:/mnt/ncdata:rw - ${NEXTCLOUD_MOUNT}:${NEXTCLOUD_MOUNT}:rw + - ${TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro environment: - POSTGRES_HOST=nextcloud-aio-database - POSTGRES_PASSWORD=${DATABASE_PASSWORD} @@ -92,6 +95,7 @@ services: - FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED} - FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch - PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME} + - TRUSTED_CACERTS_DIR=${TRUSTED_CACERTS_DIR} stop_grace_period: 10s restart: unless-stopped networks: @@ -113,7 +117,7 @@ services: image: nextcloud/aio-collabora:latest environment: - aliasgroup1=https://${NC_DOMAIN}:443 - - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true + - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true ${COLLABORA_SECCOMP_POLICY} - dictionaries=${COLLABORA_DICTIONARIES} - TZ=${TIMEZONE} stop_grace_period: 10s diff --git a/manual-install/sample.conf b/manual-install/sample.conf index bdaa4780..d8fc73a6 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -1,9 +1,11 @@ AIO_TOKEN=123456 # Has no function but needs to be set! AIO_URL=localhost # Has no function but needs to be set! +APACHE_MAX_SIZE=10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy. CLAMAV_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. 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 COLLABORA_ENABLED=yes # Setting this to "yes" enables the option in Nextcloud automatically. +COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container. DATABASE_PASSWORD= # TODO! This needs to be a unique and good password! FULLTEXTSEARCH_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. IMAGINARY_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. @@ -21,5 +23,6 @@ SIGNALING_SECRET= # TODO! This needs to be a unique and good password! TALK_ENABLED=yes # Setting this to "yes" enables the option in Nextcloud automatically. TALK_PORT=3478 # This allows to adjust the port that the talk container is using. TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use. +TRUSTED_CACERTS_DIR=/path/to/my/cacerts # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory. TURN_SECRET= # TODO! This needs to be a unique and good password! UPDATE_NEXTCLOUD_APPS=no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays. From 240a29cb2b544791621ab4f0a46676a2c81c12f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 12:40:43 +0000 Subject: [PATCH 0044/3949] Bump caddy from 2.5.2-alpine to 2.6.1-alpine in /Containers/apache Bumps caddy from 2.5.2-alpine to 2.6.1-alpine. --- updated-dependencies: - dependency-name: caddy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index c60aadad..106436ee 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,5 +1,5 @@ # Caddy is a requirement -FROM caddy:2.5.2-alpine as caddy +FROM caddy:2.6.1-alpine as caddy FROM debian:bullseye-20220912-slim From fb8fcae3d6b74598db3f0c14fb0d00005649bf5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 12:40:50 +0000 Subject: [PATCH 0045/3949] Bump caddy in /Containers/mastercontainer Bumps caddy from 2.5.2-alpine to 2.6.1-alpine. --- updated-dependencies: - dependency-name: caddy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 8dd76153..939368e1 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -2,7 +2,7 @@ FROM docker:20.10.18-dind-alpine3.16 as dind # Caddy is a requirement -FROM caddy:2.5.2-alpine as caddy +FROM caddy:2.6.1-alpine as caddy # From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile FROM php:8.0.23-apache-bullseye From 0523af0f8a3c8dd98387fe87ffe776b53d79fb23 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 25 Sep 2022 18:55:07 +0200 Subject: [PATCH 0046/3949] add a hint that the chosen datadir needs to be cleaned up as well Signed-off-by: szaimen --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 5b31e1b2..bfc991be 100644 --- a/readme.md +++ b/readme.md @@ -196,7 +196,7 @@ Here is how to reset the AIO instance properly: 1. Now remove all these stopped containers with `sudo docker container prune` 1. Delete the docker network with `sudo docker network rm nextcloud-aio` 1. Check which volumes are dangling with `sudo docker volume ls --filter "dangling=true"` -1. Now remove all these dangling volumes: `sudo docker volume prune` (on Windows you might need to remove some volumes afterwards manually with `docker volume rm nextcloud_aio_backupdir`, `docker volume rm nextcloud_aio_nextcloud_datadir`) +1. Now remove all these dangling volumes: `sudo docker volume prune` (on Windows you might need to remove some volumes afterwards manually with `docker volume rm nextcloud_aio_backupdir`, `docker volume rm nextcloud_aio_nextcloud_datadir`). Also if you've configured `NEXTCLOUD_DATADIR` to a path on your host instead of the default volume, you need to clean that up as well. 1. Optional: You can remove all docker images with `sudo docker image prune -a`. 1. And you are done! Now feel free to start over with the recommended docker run command! From 2af13efe6390ac4df515b9e2f3ef8003f087f63c Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 26 Sep 2022 12:18:58 +0200 Subject: [PATCH 0047/3949] update some files Signed-off-by: szaimen --- Containers/onlyoffice/Dockerfile | 2 +- manual-install/update-yaml.sh | 4 ---- php/templates/containers.twig | 6 +++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Containers/onlyoffice/Dockerfile b/Containers/onlyoffice/Dockerfile index 6be6b60e..31c243d8 100644 --- a/Containers/onlyoffice/Dockerfile +++ b/Containers/onlyoffice/Dockerfile @@ -1,4 +1,4 @@ # From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile -FROM onlyoffice/documentserver:7.1.1.23 +FROM onlyoffice/documentserver:7.2.0.204 HEALTHCHECK CMD curl -skfI localhost || exit 1 \ No newline at end of file diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 3cbc708e..d8945f7b 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -123,9 +123,5 @@ sed -i '/image:/s/$/:latest-arm64/' latest-arm64.yml sed -i '/ nextcloud-aio-clamav:/,/^ $/d' latest-arm64.yml sed -i '/nextcloud[-_]aio[-_]clamav/d' latest-arm64.yml sed -i '/CLAMAV_ENABLED/d' latest-arm64.yml -sed -i '/ nextcloud-aio-onlyoffice:/,/^ $/d' latest-arm64.yml -sed -i '/nextcloud[-_]aio[-_]onlyoffice/d' latest-arm64.yml -sed -i '/ONLYOFFICE_ENABLED/d' latest-arm64.yml -sed -i '/ONLYOFFICE_SECRET/d' latest-arm64.yml rm containers.yml diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 0bee9d6c..24e1dc5a 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -483,20 +483,20 @@

{% endif %} {% if is_onlyoffice_enabled == true %} -
+
{% else %} - {#
#} + {#
#} {% endif %} Minimal system requirements: When any optional addon is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV or Fulltextsearch, at least 3GB RAM are required. When enabling everything, at least 4GB RAM are required. Recommended are at least 1GB more RAM than the minimal requirement.

{% if isAnyRunning == true or is_x64_platform == false %} - {% endif %} {% if isAnyRunning == true %} + {% endif %} From 8889e92a649bc5bbbc08ae13ef71a9675ab2c62d Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 26 Sep 2022 12:22:05 +0200 Subject: [PATCH 0048/3949] fix incorrect removal of OO Signed-off-by: szaimen --- Containers/nextcloud/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index a4238fbc..ac3cabe4 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -382,7 +382,7 @@ if [ "$ONLYOFFICE_ENABLED" = 'yes' ]; then php /var/www/html/occ config:app:set onlyoffice DocumentServerUrl --value="https://$NC_DOMAIN/onlyoffice" php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool --value=true else - if [ -d "/var/www/html/custom_apps/onlyoffice" ]; then + if [ -d "/var/www/html/custom_apps/onlyoffice" ] && [ -n "$ONLYOFFICE_SECRET" ] && [ "$(php /var/www/html/occ config:system:get onlyoffice jwt_secret)" = "$ONLYOFFICE_SECRET" ]; then php /var/www/html/occ app:remove onlyoffice fi fi From 730128b1ab7914b6475bb9b8fe00ee0fc28ab8b9 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 26 Sep 2022 19:25:04 +0200 Subject: [PATCH 0049/3949] add HaProxy to reverse proxy documentation Signed-off-by: szaimen --- reverse-proxy.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/reverse-proxy.md b/reverse-proxy.md index ec29d6c9..1d8124e3 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -135,6 +135,42 @@ Although it does not seems like it is the case but from AIO perspective a Cloudf +### HaProxy + +
+ +click here to expand + +Here is an example HaProxy config: + +``` +global + chroot /var/haproxy + log /var/run/log audit debug + lua-prepend-path /tmp/haproxy/lua/?.lua + +defaults + log global + option redispatch -1 + retries 3 + default-server init-addr last,libc + +# Frontend: LetsEncrypt_443 () +frontend LetsEncrypt_443 + # ACL: Nextcloud + acl acl_60604e669c3ca4.13013327 hdr(host) -i + +# Backend: Nextcloud () +backend Nextcloud + mode http + balance source + server Nextcloud localhost:11000 +``` + +Of course you need to modify `` to the domain on which you want to run Nextcloud. Also make sure to adjust the port 11000 to match the chosen APACHE_PORT. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `localhost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux) + +
+ ### Nginx
From fd3c30bdb7a8ce8c41baa2f1d808108865446cc3 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 26 Sep 2022 19:28:18 +0200 Subject: [PATCH 0050/3949] add a disclaimer Signed-off-by: szaimen --- reverse-proxy.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reverse-proxy.md b/reverse-proxy.md index 1d8124e3..9078c2d4 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -141,6 +141,8 @@ Although it does not seems like it is the case but from AIO perspective a Cloudf click here to expand +**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome! + Here is an example HaProxy config: ``` From dafa03698ba55eedf4e54f4313e8098d984cd1a0 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 27 Sep 2022 11:28:50 +0200 Subject: [PATCH 0051/3949] fix talk startup logs Signed-off-by: szaimen --- Containers/talk/start.sh | 2 ++ Containers/talk/supervisord.conf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Containers/talk/start.sh b/Containers/talk/start.sh index dcb53e9d..d0a502be 100644 --- a/Containers/talk/start.sh +++ b/Containers/talk/start.sh @@ -43,6 +43,8 @@ sed -i 's|#turn_type .*|turn_type = "udp"|g' /etc/janus/janus.jcfg sed -i 's|#ice_ignore_list .*|ice_ignore_list = "udp"|g' /etc/janus/janus.jcfg sed -i 's|#interface.*|interface = "lo"|g' /etc/janus/janus.transport.websockets.jcfg sed -i 's|#ws_interface.*|ws_interface = "lo"|g' /etc/janus/janus.transport.websockets.jcfg +sed -i 's|certfile =|#certfile =|g' /etc/janus/janus.transport.mqtt.jcfg +sed -i 's|keyfile =|#keyfile =|g' /etc/janus/janus.transport.mqtt.jcfg set +x # Signling diff --git a/Containers/talk/supervisord.conf b/Containers/talk/supervisord.conf index 5e2dcd79..5edf5480 100644 --- a/Containers/talk/supervisord.conf +++ b/Containers/talk/supervisord.conf @@ -27,7 +27,7 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=/usr/bin/janus --config=/etc/janus/janus.jcfg --disable-colors --daemon --log-stdout +command=/usr/bin/janus --config=/etc/janus/janus.jcfg --disable-colors --log-stdout [program:signaling] stdout_logfile=/dev/stdout From 7716548c752e9758f7b8a6a450e616097a777467 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 12:34:31 +0000 Subject: [PATCH 0052/3949] Bump collabora/code in /Containers/collabora Bumps collabora/code from 22.05.6.1.1 to 22.05.6.3.1. --- updated-dependencies: - dependency-name: collabora/code dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/collabora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 9b51b412..173ec374 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -1,5 +1,5 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker -FROM collabora/code:22.05.6.1.1 +FROM collabora/code:22.05.6.3.1 USER root From bce24687cc261e3bc0557063124a7a0e8bf0ead9 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 27 Sep 2022 14:54:49 +0200 Subject: [PATCH 0053/3949] add Synology Reverse Proxyy to reverse proxy documentation Signed-off-by: szaimen --- reverse-proxy.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/reverse-proxy.md b/reverse-proxy.md index ec29d6c9..c30bc0f3 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -203,6 +203,24 @@ Of course you need to modify `` to the domain on which you want
+### Synology Reverse Proxy + +
+ +click here to expand + +**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome! + +See these screenshots for a working config: + +![image](https://user-images.githubusercontent.com/89748315/192525606-48cab54b-866e-4964-90a8-15e71bd362fb.png) + +![image](https://user-images.githubusercontent.com/89748315/192525681-c06f3b39-f510-458e-b1f2-6b2cd995e24c.png) + +Of course you need to modify `` to the domain on which you want to run Nextcloud. Also make sure to adjust the port 11000 to match the chosen APACHE_PORT. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `localhost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux) + +
+ ### Traefik 2
From 27d70b7739e474b027890b2394eed936c7bd0d2c Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 28 Sep 2022 12:22:33 +0000 Subject: [PATCH 0054/3949] dependency updates Signed-off-by: GitHub --- php/composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index f1f66951..458d1dce 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -1686,16 +1686,16 @@ }, { "name": "twig/twig", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077" + "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077", - "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/c38fd6b0b7f370c198db91ffd02e23b517426b58", + "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58", "shasum": "" }, "require": { @@ -1746,7 +1746,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.4.2" + "source": "https://github.com/twigphp/Twig/tree/v3.4.3" }, "funding": [ { @@ -1758,7 +1758,7 @@ "type": "tidelift" } ], - "time": "2022-08-12T06:47:24+00:00" + "time": "2022-09-28T08:42:51+00:00" } ], "packages-dev": [], From 6e34656540d0fe33fd2fb8ba7518e6bee16d4f85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:41:48 +0000 Subject: [PATCH 0055/3949] Bump php in /Containers/mastercontainer Bumps php from 8.0.23-apache-bullseye to 8.0.24-apache-bullseye. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 939368e1..308d3262 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -5,7 +5,7 @@ FROM docker:20.10.18-dind-alpine3.16 as dind FROM caddy:2.6.1-alpine as caddy # From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile -FROM php:8.0.23-apache-bullseye +FROM php:8.0.24-apache-bullseye EXPOSE 80 EXPOSE 8080 From ece09c2f4173c7ba4b196cc55021bf55fcf94923 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:41:48 +0000 Subject: [PATCH 0056/3949] Bump php in /Containers/nextcloud Bumps php from 8.0.23-fpm-alpine3.16 to 8.0.24-fpm-alpine3.16. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 332444cf..3692b044 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/nextcloud/docker/blob/master/23/fpm-alpine/Dockerfile -FROM php:8.0.23-fpm-alpine3.16 +FROM php:8.0.24-fpm-alpine3.16 # Custom: change id of www-data user as it needs to be the same like on old installations RUN set -ex; \ From 7239360a70d088ee50fd3fecf0354a9f5828bd47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 13:05:56 +0000 Subject: [PATCH 0057/3949] Bump nextcloud/imaginary in /Containers/imaginary Bumps nextcloud/imaginary from 20220919 to 20221003. --- updated-dependencies: - dependency-name: nextcloud/imaginary dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Containers/imaginary/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index c9cdecea..dd9ea352 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/h2non/imaginary/blob/master/Dockerfile -FROM nextcloud/imaginary:20220919 +FROM nextcloud/imaginary:20221003 USER root RUN set -ex; \ From 7e235b088fffa03fb66ce673ee26bfb4532d4da5 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 3 Oct 2022 17:40:52 +0200 Subject: [PATCH 0058/3949] remove codeowners Signed-off-by: szaimen --- CODEOWNERS | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 37219f9c..00000000 --- a/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @szaimen @juliushaertl From b63f50e00bb27c1aa882cb723ae27afb5fb7e3ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:40:30 +0000 Subject: [PATCH 0059/3949] Bump debian in /Containers/borgbackup Bumps debian from bullseye-20220912-slim to bullseye-20221004-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/borgbackup/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index 8327f3a2..7922e28b 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-20220912-slim +FROM debian:bullseye-20221004-slim RUN set -ex; \ \ From fcabd7cf50f492e48d0fe1b4d159baeed77aeb22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:40:30 +0000 Subject: [PATCH 0060/3949] Bump ubuntu from focal-20220826 to focal-20220922 in /Containers/talk Bumps ubuntu from focal-20220826 to focal-20220922. --- updated-dependencies: - dependency-name: ubuntu dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/talk/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index 1a7e3dfb..1bbdd768 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220826 +FROM ubuntu:focal-20220922 RUN set -ex; \ \ From dd607243d73ccd7e9fb7207b37ee0c3d8c6851f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:40:33 +0000 Subject: [PATCH 0061/3949] Bump debian in /Containers/apache Bumps debian from bullseye-20220912-slim to bullseye-20221004-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index 106436ee..2f3b0509 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,7 +1,7 @@ # Caddy is a requirement FROM caddy:2.6.1-alpine as caddy -FROM debian:bullseye-20220912-slim +FROM debian:bullseye-20221004-slim RUN mkdir -p /mnt/data; \ chown www-data:www-data /mnt/data; From 1a2b4217ec488b769111ca8c37e0bf26f3ef54f4 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 12:59:23 +0000 Subject: [PATCH 0062/3949] nextcloud-update automated change Signed-off-by: GitHub --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 332444cf..cf153901 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -107,7 +107,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 24.0.5 +ENV NEXTCLOUD_VERSION 24.0.6 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ From b88b55feb405719b32727fcc9b6ca6299b7cf777 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 18:27:19 +0200 Subject: [PATCH 0063/3949] add channel advice Signed-off-by: szaimen --- php/templates/containers.twig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 24e1dc5a..d2a59ace 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -167,7 +167,11 @@ {% endif %} {% if domain != "" and was_start_button_clicked == true %} + {% if current_channel starts with 'latest' or current_channel starts with 'beta' or current_channel starts with 'develop' %} You are running the {{ current_channel }} channel. (Logs)

+ {% else %} + No channel was found. This means that AIO is not able to update itself and its component and will also not be able to report about updates. Updates need to be done externally. + {% endif %} {% endif %} {% if is_backup_container_running == true %} From 1b7c7a3d66e14159c8fe8e5c92cab331e0b0bd43 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 18:59:23 +0200 Subject: [PATCH 0064/3949] add lets encrypt back Signed-off-by: szaimen --- reverse-proxy.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/reverse-proxy.md b/reverse-proxy.md index 9078c2d4..3fd40b2f 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -159,9 +159,61 @@ defaults # Frontend: LetsEncrypt_443 () frontend LetsEncrypt_443 + bind 0.0.0.0:443 name 0.0.0.0:443 ssl prefer-client-ciphers ssl-min-ver TLSv1.2 ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 crt-list /tmp/haproxy/ssl/605f6609f106d1.17683543.certlist + mode http + option http-keep-alive + default_backend acme_challenge_backend + option forwardfor + # tuning options + timeout client 30s + + # logging options + # ACL: find_acme_challenge + acl acl_605f6d4b6453d2.03059920 path_beg -i /.well-known/acme-challenge/ # ACL: Nextcloud acl acl_60604e669c3ca4.13013327 hdr(host) -i + # ACTION: redirect_acme_challenges + use_backend acme_challenge_backend if acl_605f6d4b6453d2.03059920 + # ACTION: Nextcloud + use_backend Nextcloud if acl_60604e669c3ca4.13013327 + + +# Frontend: LetsEncrypt_80 () +frontend LetsEncrypt_80 + bind 0.0.0.0:80 name 0.0.0.0:80 + mode tcp + default_backend acme_challenge_backend + # tuning options + timeout client 30s + + # logging options + # ACL: find_acme_challenge + acl acl_605f6d4b6453d2.03059920 path_beg -i /.well-known/acme-challenge/ + + # ACTION: redirect_acme_challenges + use_backend acme_challenge_backend if acl_605f6d4b6453d2.03059920 + +# Frontend (DISABLED): 1_HTTP_frontend () + +# Frontend (DISABLED): 1_HTTPS_frontend () + +# Frontend (DISABLED): 0_SNI_frontend () + +# Backend: acme_challenge_backend (Added by Let's Encrypt plugin) +backend acme_challenge_backend + # health checking is DISABLED + mode http + balance source + # stickiness + stick-table type ip size 50k expire 30m + stick on src + # tuning options + timeout connect 30s + timeout server 30s + http-reuse safe + server acme_challenge_host 127.0.0.1:43580 + # Backend: Nextcloud () backend Nextcloud mode http From abbeaa31d77bb46d3de07dcef60a5be35367d194 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 20:08:46 +0200 Subject: [PATCH 0065/3949] add a check for free space Signed-off-by: szaimen --- php/src/Data/ConfigurationManager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index a816e4f4..deb601ef 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -439,6 +439,10 @@ class ConfigurationManager if(!is_dir(DataConst::GetDataDirectory())) { throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not exist! Something was set up falsely!"); } + $df = disk_free_space(DataConst::GetDataDirectory()); + if ($df !== false && (int)$df < 10240) { + throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not have enough space for writing the config file! Not writing it back!"); + } file_put_contents(DataConst::GetConfigFile(), json_encode($config)); } From 95311fd7c3887a7e183b61e63212316f05da75c8 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 22:34:10 +0200 Subject: [PATCH 0066/3949] use netcat for healthchecks Signed-off-by: szaimen --- Containers/apache/healthcheck.sh | 4 ++-- Containers/collabora/Dockerfile | 3 ++- Containers/domaincheck/Dockerfile | 4 ++-- Containers/imaginary/Dockerfile | 3 ++- Containers/nextcloud/Dockerfile | 2 +- Containers/talk/Dockerfile | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Containers/apache/healthcheck.sh b/Containers/apache/healthcheck.sh index b11d8b5b..667c94d3 100644 --- a/Containers/apache/healthcheck.sh +++ b/Containers/apache/healthcheck.sh @@ -2,7 +2,7 @@ curl -skfI localhost:8000 || exit 1 if [ "$APACHE_PORT" != '443' ]; then - curl -skfI localhost:"$APACHE_PORT" || exit 1 + nc -z localhost "$APACHE_PORT" || exit 1 else - curl -skfI https://"$NC_DOMAIN":"$APACHE_PORT" || exit 1 + nc -z "$NC_DOMAIN" "$APACHE_PORT" || exit 1 fi diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 173ec374..0eab5a39 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -9,9 +9,10 @@ RUN set -ex; \ export DEBIAN_FRONTEND=noninteractive; \ apt-get install -y --no-install-recommends \ tzdata \ + netcat \ ; \ rm -rf /var/lib/apt/lists/* USER 104 -HEALTHCHECK CMD curl -skfI localhost:9980 || exit 1 +HEALTHCHECK CMD nc -z localhost 9980 || exit 1 diff --git a/Containers/domaincheck/Dockerfile b/Containers/domaincheck/Dockerfile index ab09e156..57192bcc 100644 --- a/Containers/domaincheck/Dockerfile +++ b/Containers/domaincheck/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:3.16.2 -RUN apk add --update --no-cache lighttpd bash curl +RUN apk add --update --no-cache lighttpd bash curl netcat-openbsd RUN adduser -S www-data -G www-data RUN rm -rf /etc/lighttpd/lighttpd.conf @@ -15,4 +15,4 @@ USER www-data RUN mkdir -p /var/www/domaincheck/ ENTRYPOINT ["/start.sh"] -HEALTHCHECK CMD curl -skfI localhost:$APACHE_PORT || exit 1 \ No newline at end of file +HEALTHCHECK CMD nc -z localhost $APACHE_PORT || exit 1 \ No newline at end of file diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index dd9ea352..a3e7c94c 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -8,8 +8,9 @@ RUN set -ex; \ apt-get install -y --no-install-recommends \ ca-certificates \ curl \ + netcat \ ; \ rm -rf /var/lib/apt/lists/* USER nobody -HEALTHCHECK CMD curl -skI 127.0.0.1:9000 || exit 1 \ No newline at end of file +HEALTHCHECK CMD nc -z localhost 9000 || exit 1 \ No newline at end of file diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index f536a699..24a3304d 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -252,4 +252,4 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd USER www-data ENTRYPOINT ["/start.sh"] -HEALTHCHECK CMD (nc -z localhost 9000 && curl -skI localhost:7867) || exit 1 \ No newline at end of file +HEALTHCHECK CMD (nc -z localhost 9000 && nc -z localhost 7867) || exit 1 \ No newline at end of file diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index 1bbdd768..7e0e9e27 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -69,4 +69,4 @@ USER talk ENTRYPOINT ["start.sh"] CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] -HEALTHCHECK CMD (curl -skI localhost:8081 && curl -skI localhost:8188 && curl -skf --http0.9 localhost:4222 && nc -z localhost $TALK_PORT) || exit 1 \ No newline at end of file +HEALTHCHECK CMD (nc -z localhost 8081 && nc -z localhost 8188 && nc -z localhost 4222 && nc -z localhost $TALK_PORT) || exit 1 \ No newline at end of file From 1cf6f995d42207a4f8e850f2afed4cfaf64ae486 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 22:42:18 +0200 Subject: [PATCH 0067/3949] increase to 2.0.4 Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index d2a59ace..e3851142 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.0.3

+

Nextcloud AIO v2.0.4

{% set isAnyRunning = false %} {% set isAnyRestarting = false %} From 56af317778a89cfd02e2d4daece2949637b27352 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 23:02:59 +0200 Subject: [PATCH 0068/3949] use correct config syntax Signed-off-by: szaimen --- Containers/apache/supervisord.conf | 46 ++++++++++----------- Containers/mastercontainer/supervisord.conf | 2 +- Containers/talk/supervisord.conf | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Containers/apache/supervisord.conf b/Containers/apache/supervisord.conf index 0abc9748..90436e05 100644 --- a/Containers/apache/supervisord.conf +++ b/Containers/apache/supervisord.conf @@ -1,23 +1,23 @@ -[supervisord] -nodaemon=true -nodaemon=true -logfile=/var/log/supervisord/supervisord.log -pidfile=/var/run/supervisord/supervisord.pid -childlogdir=/var/log/supervisord/ -logfile_maxbytes=50MB -logfile_backups=10 -loglevel=error - -[program:apache] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -command=apachectl -DFOREGROUND - -[program:caddy] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -command=/usr/bin/caddy run -config /Caddyfile \ No newline at end of file +[supervisord] +nodaemon=true +nodaemon=true +logfile=/var/log/supervisord/supervisord.log +pidfile=/var/run/supervisord/supervisord.pid +childlogdir=/var/log/supervisord/ +logfile_maxbytes=50MB +logfile_backups=10 +loglevel=error + +[program:apache] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=apachectl -DFOREGROUND + +[program:caddy] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=/usr/bin/caddy run --config /Caddyfile \ No newline at end of file diff --git a/Containers/mastercontainer/supervisord.conf b/Containers/mastercontainer/supervisord.conf index ad24f412..aea8aaa0 100644 --- a/Containers/mastercontainer/supervisord.conf +++ b/Containers/mastercontainer/supervisord.conf @@ -20,7 +20,7 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=sudo -u www-data /usr/bin/caddy run -config /Caddyfile +command=sudo -u www-data /usr/bin/caddy run --config /Caddyfile [program:cron] stdout_logfile=/dev/stdout diff --git a/Containers/talk/supervisord.conf b/Containers/talk/supervisord.conf index 5edf5480..c42bbde1 100644 --- a/Containers/talk/supervisord.conf +++ b/Containers/talk/supervisord.conf @@ -34,4 +34,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=signaling -config /etc/signaling/server.conf +command=signaling --config /etc/signaling/server.conf From be299dfe8caba72352bc3cf2c1cb1321b8568783 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 6 Oct 2022 23:22:19 +0200 Subject: [PATCH 0069/3949] add it to mastercontainer as well Signed-off-by: szaimen --- Containers/mastercontainer/healthcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/healthcheck.sh b/Containers/mastercontainer/healthcheck.sh index 3a0d0b33..c3a5e3fd 100644 --- a/Containers/mastercontainer/healthcheck.sh +++ b/Containers/mastercontainer/healthcheck.sh @@ -1,5 +1,5 @@ #!/bin/bash if [ -f "/mnt/docker-aio-config/data/configuration.json" ]; then - curl -skfI https://localhost:8080 || exit 1 + nc -z localhost 8080 || exit 1 fi From d5a1fa32c46a898ac784f9e745e110fa2df7a687 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Sat, 8 Oct 2022 04:50:55 +0000 Subject: [PATCH 0070/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index 5a180b35..ded87b96 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From ca5e97ef5bfe26453a5d7c5b89613f89537694ab Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 8 Oct 2022 20:44:15 +0200 Subject: [PATCH 0071/3949] rework the apache reverse proxy documentation Signed-off-by: szaimen --- reverse-proxy.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index c30bc0f3..ffb3d782 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -41,14 +41,14 @@ Add this as a new Apache site config: ServerName - # Reverse proxy - RewriteEngine On + # Reverse proxy based on https://httpd.apache.org/docs/current/mod/mod_proxy_wstunnel.html + RewriteEngine on ProxyPreserveHost On + AllowEncodedSlashes NoDecode + ProxyPass / http://localhost:11000/ RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] - RewriteRule ^/(.*) "ws://localhost:11000/$1" [P,L] - ProxyPass / http://localhost:11000/ - ProxyPassReverse / http://localhost:11000/ + RewriteRule ^/?(.*) "ws://localhost:11000/$1" [P,QSA,B=?:;] # Enable h2, h2c and http1.1 Protocols h2 h2c http/1.1 From 0bbae775c625e8f42169495cc4b468951b458611 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 9 Oct 2022 17:28:29 +0200 Subject: [PATCH 0072/3949] small detail Signed-off-by: szaimen --- reverse-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index ffb3d782..16b0c509 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -42,7 +42,7 @@ Add this as a new Apache site config: ServerName # Reverse proxy based on https://httpd.apache.org/docs/current/mod/mod_proxy_wstunnel.html - RewriteEngine on + RewriteEngine On ProxyPreserveHost On AllowEncodedSlashes NoDecode ProxyPass / http://localhost:11000/ From ce47fab5553c35ab1c505cd9da2e70042788a2de Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 9 Oct 2022 17:48:40 +0200 Subject: [PATCH 0073/3949] remove the issue from the doc Signed-off-by: szaimen --- reverse-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 16b0c509..742e1b71 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -21,7 +21,7 @@ In order to run Nextcloud behind a reverse proxy, you need to specify the port t click here to expand -**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. See e.g. https://github.com/nextcloud/all-in-one/issues/834. Improvements to it are very welcome! +**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome! Add this as a new Apache site config: From c4e5e0e8d48c7c8706023c86d26cdd13c524b897 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Wed, 12 Oct 2022 05:08:47 +0000 Subject: [PATCH 0074/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index ded87b96..f6d5a2ab 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From 6c81f2b244db13da2a2aafdc19e29d1b66d6537d Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 12 Oct 2022 12:23:55 +0000 Subject: [PATCH 0075/3949] Yaml updates Signed-off-by: GitHub --- manual-install/latest-arm64.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/manual-install/latest-arm64.yml b/manual-install/latest-arm64.yml index c2f52fb4..bffb2441 100644 --- a/manual-install/latest-arm64.yml +++ b/manual-install/latest-arm64.yml @@ -4,6 +4,7 @@ services: nextcloud-aio-apache: container_name: nextcloud-aio-apache depends_on: + - nextcloud-aio-onlyoffice - nextcloud-aio-collabora - nextcloud-aio-talk - nextcloud-aio-nextcloud @@ -16,6 +17,7 @@ services: - COLLABORA_HOST=nextcloud-aio-collabora - TALK_HOST=nextcloud-aio-talk - APACHE_PORT=${APACHE_PORT} + - ONLYOFFICE_HOST=nextcloud-aio-onlyoffice - TZ=${TIMEZONE} - APACHE_MAX_SIZE=${APACHE_MAX_SIZE} - APACHE_MAX_TIME=${NEXTCLOUD_MAX_TIME} @@ -73,11 +75,14 @@ services: - OVERWRITEPROTOCOL=https - TURN_SECRET=${TURN_SECRET} - SIGNALING_SECRET=${SIGNALING_SECRET} + - ONLYOFFICE_SECRET=${ONLYOFFICE_SECRET} - AIO_URL=${AIO_URL} - NEXTCLOUD_MOUNT=${NEXTCLOUD_MOUNT} + - ONLYOFFICE_ENABLED=${ONLYOFFICE_ENABLED} - COLLABORA_ENABLED=${COLLABORA_ENABLED} - COLLABORA_HOST=nextcloud-aio-collabora - TALK_ENABLED=${TALK_ENABLED} + - ONLYOFFICE_HOST=nextcloud-aio-onlyoffice - UPDATE_NEXTCLOUD_APPS=${UPDATE_NEXTCLOUD_APPS} - TZ=${TIMEZONE} - TALK_PORT=${TALK_PORT} @@ -135,6 +140,21 @@ services: networks: - nextcloud-aio + nextcloud-aio-onlyoffice: + container_name: nextcloud-aio-onlyoffice + image: nextcloud/aio-onlyoffice:latest-arm64 + environment: + - TZ=${TIMEZONE} + - JWT_ENABLED=true + - JWT_HEADER=AuthorizationJwt + - JWT_SECRET=${ONLYOFFICE_SECRET} + volumes: + - nextcloud_aio_onlyoffice:/var/lib/onlyoffice:rw + stop_grace_period: 10s + restart: unless-stopped + networks: + - nextcloud-aio + nextcloud-aio-imaginary: container_name: nextcloud-aio-imaginary image: nextcloud/aio-imaginary:latest-arm64 @@ -170,6 +190,8 @@ volumes: name: nextcloud_aio_elasticsearch nextcloud_aio_nextcloud: name: nextcloud_aio_nextcloud + nextcloud_aio_onlyoffice: + name: nextcloud_aio_onlyoffice nextcloud_aio_nextcloud_data: name: nextcloud_aio_nextcloud_data From 5641f62561cb3f1918ae0482a75653629a10834a Mon Sep 17 00:00:00 2001 From: Klaus15 Date: Thu, 13 Oct 2022 23:04:32 +0200 Subject: [PATCH 0076/3949] Update nginx section of reverse-proxy.md added nginx.conf code snippet to get a working websocket config Signed-off-by: Klaus15 --- reverse-proxy.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reverse-proxy.md b/reverse-proxy.md index 742e1b71..786685bc 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -159,7 +159,19 @@ location / { proxy_set_header Connection $connection_upgrade; } ``` +and this to the http{...}-section in your nginx.conf: +``` + ## + # Connection header for WebSocket reverse proxy + ## + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } +``` +(otherwise nginx will fail to start with a message saying the variable named connection_upgrade does not exist) + Of course you need to modify `` to the domain on which you want to run Nextcloud. Also make sure to adjust the port 11000 to match the chosen APACHE_PORT. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `localhost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux) **Advice:** You may have a look at [this](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-2811152) for a more complete example. From b6470db144f29a64e32970edc5f324eb1e908a62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Oct 2022 12:21:19 +0000 Subject: [PATCH 0077/3949] Bump caddy from 2.6.1-alpine to 2.6.2-alpine in /Containers/apache Bumps caddy from 2.6.1-alpine to 2.6.2-alpine. --- updated-dependencies: - dependency-name: caddy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index 2f3b0509..26be8471 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,5 +1,5 @@ # Caddy is a requirement -FROM caddy:2.6.1-alpine as caddy +FROM caddy:2.6.2-alpine as caddy FROM debian:bullseye-20221004-slim From 4e598b9de3e7b7fa00daa1c2974f59cb199000bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Oct 2022 12:21:20 +0000 Subject: [PATCH 0078/3949] Bump caddy in /Containers/mastercontainer Bumps caddy from 2.6.1-alpine to 2.6.2-alpine. --- updated-dependencies: - dependency-name: caddy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 308d3262..12bd701f 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -2,7 +2,7 @@ FROM docker:20.10.18-dind-alpine3.16 as dind # Caddy is a requirement -FROM caddy:2.6.1-alpine as caddy +FROM caddy:2.6.2-alpine as caddy # From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile FROM php:8.0.24-apache-bullseye From 9d4c591f1afa5b67ed64aaf7bf2517b2a95ce2b4 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 15 Oct 2022 00:48:52 +0200 Subject: [PATCH 0079/3949] add not to borg delete regarding freeing space Signed-off-by: szaimen --- readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readme.md b/readme.md index bfc991be..0a11ecc8 100644 --- a/readme.md +++ b/readme.md @@ -270,6 +270,12 @@ sudo borg list "/mnt/backup/borg" # An example backup archive might be called 20220223_174237-nextcloud-aio # Then you can simply delete the archive with: sudo borg delete --stats --progress "/mnt/backup/borg::20220223_174237-nextcloud-aio" + +# If borg 1.2.0 or higher is installed, you then need to run borg compact in order to clean up the freed space +sudo borg version +# If version number of the command above is higher than 1.2.0 you need to run the command below: +sudo borg compact "/mnt/backup/" + ``` After doing so, make sure to update the backup archives list in the AIO interface!
From 8450d7d9a53b7322dcf831f657e5691ff8b2682a Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Sat, 15 Oct 2022 09:57:35 +0000 Subject: [PATCH 0080/3949] Updating lint-php.yml workflow from template Signed-off-by: Nextcloud bot --- .github/workflows/lint-php.yml | 105 ++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 48 deletions(-) diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 5da34471..62476c90 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -1,48 +1,57 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -name: Lint - -on: - pull_request: - push: - branches: - - main - - master - - stable* - -jobs: - php-lint: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ["8.0"] - - name: php-lint - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - coverage: none - - - name: Lint - run: cd php && composer run lint - - summary: - runs-on: ubuntu-latest - needs: php-lint - - if: always() - - name: php-lint-summary - - steps: - - name: Summary status - run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: lint-php-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + php-lint: + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ["7.4", "8.0", "8.1"] + + name: php-lint + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: none + + - name: Lint + run: composer run lint + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: php-lint + + if: always() + + name: php-lint-summary + + steps: + - name: Summary status + run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi From 3118ecf385798549c5e65f305381ed9e1d8134fe Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 16 Oct 2022 17:37:13 +0200 Subject: [PATCH 0081/3949] rework session deduplication Signed-off-by: szaimen --- Containers/borgbackup/backupscript.sh | 1 + .../mastercontainer/session-deduplicator.sh | 40 +++++++++---------- php/src/Auth/AuthManager.php | 10 +++++ php/src/Controller/DockerController.php | 2 +- php/src/Controller/LoginController.php | 4 +- php/src/Data/DataConst.php | 4 ++ php/src/Middleware/AuthMiddleware.php | 8 ++-- 7 files changed, 40 insertions(+), 29 deletions(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index d2f61999..4b70d6d4 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -246,6 +246,7 @@ if [ "$BORG_MODE" = restore ]; then --exclude "nextcloud_aio_mastercontainer/session/"** \ --exclude "nextcloud_aio_mastercontainer/certs/"** \ --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \ + --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring from backup." diff --git a/Containers/mastercontainer/session-deduplicator.sh b/Containers/mastercontainer/session-deduplicator.sh index 796ccb54..08ec0f9c 100644 --- a/Containers/mastercontainer/session-deduplicator.sh +++ b/Containers/mastercontainer/session-deduplicator.sh @@ -1,26 +1,22 @@ #!/bin/bash -while true; do - while [ "$(find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep "aio_authenticated|[a-z]:1" {} \; | wc -l)" -gt 1 ]; do - # First delete all session files that are not authenticated - unset SESSION_FILES - SESSION_FILES="$(find "/mnt/docker-aio-config/session/" -mindepth 1)" - unset SESSION_FILES_ARRAY - mapfile -t SESSION_FILES_ARRAY <<< "$SESSION_FILES" - for SESSION_FILE in "${SESSION_FILES_ARRAY[@]}"; do - if [ -f "$SESSION_FILE" ] && ! grep -q "aio_authenticated|[a-z]:1" "$SESSION_FILE"; then - rm "$SESSION_FILE" - fi - done +deduplicate_sessions() { + echo "Deleting duplicate sessions" + find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep -qv "$NEW_SESSION_TIME" {} \; -delete +} - # Second clean up all sessions that are authenticated - echo "Deleting duplicate sessions" - unset OLDEST_FILE - set -x - # shellcheck disable=SC2012 - OLDEST_FILE="$(ls -t "/mnt/docker-aio-config/session/" | tail -1)" - rm "/mnt/docker-aio-config/session/$OLDEST_FILE" - set +x - done - sleep 5 +compare_times() { + if [ -f "/mnt/docker-aio-config/data/session_date_file" ]; then + unset NEW_SESSION_TIME + NEW_SESSION_TIME="$(cat "/mnt/docker-aio-config/data/session_date_file")" + if [ -n "$NEW_SESSION_TIME" ] && [ -n "$OLD_SESSION_TIME" ] && [ "$NEW_SESSION_TIME" != "$OLD_SESSION_TIME" ]; then + deduplicate_sessions + fi + OLD_SESSION_TIME="$NEW_SESSION_TIME" + fi +} + +while true; do + compare_times + sleep 2 done diff --git a/php/src/Auth/AuthManager.php b/php/src/Auth/AuthManager.php index f18f1a7b..5ee6c267 100644 --- a/php/src/Auth/AuthManager.php +++ b/php/src/Auth/AuthManager.php @@ -3,6 +3,8 @@ namespace AIO\Auth; use AIO\Data\ConfigurationManager; +use AIO\Data\DataConst; +use \DateTime; class AuthManager { private const SESSION_KEY = 'aio_authenticated'; @@ -21,6 +23,14 @@ class AuthManager { } public function SetAuthState(bool $isLoggedIn) : void { + + if (!$this->IsAuthenticated() && $isLoggedIn === true) { + $date = new DateTime(); + $dateTime = $date->getTimestamp(); + $_SESSION['date_time'] = $dateTime; + file_put_contents(DataConst::GetSessionDateFile(), (string)$dateTime); + } + $_SESSION[self::SESSION_KEY] = $isLoggedIn; } diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index c1f44312..7cf15226 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -101,7 +101,7 @@ class DockerController public function StartBackupContainerRestore(Request $request, Response $response, $args) : Response { $config = $this->configurationManager->GetConfig(); $config['backup-mode'] = 'restore'; - $config['selected-restore-time'] = $request->getParsedBody()['selected_restore_time']; + $config['selected-restore-time'] = $request->getParsedBody()['selected_restore_time'] ?? ''; $this->configurationManager->WriteConfig($config); $id = self::TOP_CONTAINER; diff --git a/php/src/Controller/LoginController.php b/php/src/Controller/LoginController.php index aaab2952..bd7cb0b5 100644 --- a/php/src/Controller/LoginController.php +++ b/php/src/Controller/LoginController.php @@ -23,7 +23,7 @@ class LoginController if (!$this->dockerActionManager->isLoginAllowed()) { return $response->withHeader('Location', '/')->withStatus(302); } - $password = $request->getParsedBody()['password']; + $password = $request->getParsedBody()['password'] ?? ''; if($this->authManager->CheckCredentials($password)) { $this->authManager->SetAuthState(true); return $response->withHeader('Location', '/')->withStatus(302); @@ -33,7 +33,7 @@ class LoginController } public function GetTryLogin(Request $request, Response $response, $args) : Response { - $token = $request->getQueryParams()['token']; + $token = $request->getQueryParams()['token'] ?? ''; if($this->authManager->CheckToken($token)) { $this->authManager->SetAuthState(true); return $response->withHeader('Location', '/')->withStatus(302); diff --git a/php/src/Data/DataConst.php b/php/src/Data/DataConst.php index 5e671c11..7ac3527e 100644 --- a/php/src/Data/DataConst.php +++ b/php/src/Data/DataConst.php @@ -46,4 +46,8 @@ class DataConst { public static function GetBackupArchivesList() : string { return self::GetDataDirectory() . '/backup_archives.list'; } + + public static function GetSessionDateFile() : string { + return self::GetDataDirectory() . '/session_date_file'; + } } diff --git a/php/src/Middleware/AuthMiddleware.php b/php/src/Middleware/AuthMiddleware.php index 98e4f7d4..c0c814b8 100644 --- a/php/src/Middleware/AuthMiddleware.php +++ b/php/src/Middleware/AuthMiddleware.php @@ -28,10 +28,10 @@ class AuthMiddleware if(!in_array($request->getUri()->getPath(), $publicRoutes)) { if(!$this->authManager->IsAuthenticated()) { - $response = new Response(); - return $response - ->withHeader('Location', '/') - ->withStatus(302); + $status = 302; + $headers = ['Location' => '/']; + $response = new Response($status, $headers); + return $response; } } From 3ac260837f29f699e5377f0476341691210ea14d Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 16 Oct 2022 18:23:27 +0200 Subject: [PATCH 0082/3949] add 2nd tab warning Signed-off-by: szaimen --- php/public/second-tab-warning.js | 12 ++++++++++++ php/templates/containers.twig | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 php/public/second-tab-warning.js diff --git a/php/public/second-tab-warning.js b/php/public/second-tab-warning.js new file mode 100644 index 00000000..63abc18b --- /dev/null +++ b/php/public/second-tab-warning.js @@ -0,0 +1,12 @@ +const channel = new BroadcastChannel('tab') + +channel.postMessage('second-tab') +// note that listener is added after posting the message + +channel.addEventListener('message', (msg) => { + if (msg.data === 'second-tab') { + // message received from 2nd tab + document.getElementById('overlay').classList.add('loading') + alert('Cannot open multiple instances. You can use AIO here by reloading the page.') + } +}); \ No newline at end of file diff --git a/php/templates/containers.twig b/php/templates/containers.twig index e3851142..d698abb9 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -18,6 +18,9 @@

Nextcloud AIO v2.0.4

+ {# Add 2nd tab warning #} + + {% set isAnyRunning = false %} {% set isAnyRestarting = false %} {% set isWatchtowerRunning = false %} From c789b7e5db4395d3bb8620163482ed594d59591f Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 17 Oct 2022 16:30:38 +0200 Subject: [PATCH 0083/3949] fix lint Signed-off-by: szaimen --- .github/workflows/lint-php.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 62476c90..730d2aa4 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -10,8 +10,6 @@ on: push: branches: - main - - master - - stable* permissions: contents: read @@ -25,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ["7.4", "8.0", "8.1"] + php-versions: ["8.0"] name: php-lint @@ -40,7 +38,7 @@ jobs: coverage: none - name: Lint - run: composer run lint + run: cd php && composer run lint summary: permissions: From d3d8b11e2807c7d2fcf7a40907e3c916e283225d Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 11 Oct 2022 20:29:52 +0200 Subject: [PATCH 0084/3949] change entrypoint of nextcloud container to root Signed-off-by: szaimen --- Containers/nextcloud/Dockerfile | 6 ++++-- Containers/nextcloud/entrypoint.sh | 4 ++-- Containers/nextcloud/notify.sh | 4 ++++ Containers/nextcloud/start.sh | 14 +++++++++++--- migration.md | 2 +- readme.md | 17 +++++------------ 6 files changed, 27 insertions(+), 20 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 24a3304d..f2398570 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -202,6 +202,7 @@ RUN set -ex; \ postgresql-client \ tzdata \ mawk \ + sudo \ ; \ rm -rf /var/lib/apt/lists/* @@ -249,7 +250,8 @@ VOLUME /mnt/ncdata # Give root a random password RUN echo "root:$(openssl rand -base64 12)" | chpasswd -USER www-data +USER root ENTRYPOINT ["/start.sh"] +CMD ["sudo", "-u", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] -HEALTHCHECK CMD (nc -z localhost 9000 && nc -z localhost 7867) || exit 1 \ No newline at end of file +HEALTHCHECK CMD (sudo -u www-data nc -z localhost 9000 && sudo -u www-data nc -z localhost 7867) || exit 1 \ No newline at end of file diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index ac3cabe4..8e8224d4 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -32,8 +32,8 @@ fi touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then echo "The www-data user doesn't seem to have access rights in the datadir. -Did you maybe change the datadir and did forget to apply the correct permissions? -See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir +Most likely are the files located on a drive that does not follow linux permissions. +Please adjust the permissions like mentioned below. The found permissions are: $(stat -c "%u:%g %a" "$NEXTCLOUD_DATA_DIR") (userID:groupID permissions) diff --git a/Containers/nextcloud/notify.sh b/Containers/nextcloud/notify.sh index 3b0875b7..f6090626 100644 --- a/Containers/nextcloud/notify.sh +++ b/Containers/nextcloud/notify.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [[ "$EUID" = 0 ]]; then + sudo -u www-data -s +fi + SUBJECT="$1" MESSAGE="$2" diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 8b7e8d97..0d32c0d2 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -1,7 +1,7 @@ #!/bin/bash # Only start container if database is accessible -while ! nc -z "$POSTGRES_HOST" 5432; do +while ! sudo -u www-data nc -z "$POSTGRES_HOST" 5432; do echo "Waiting for database to start..." sleep 5 done @@ -13,7 +13,7 @@ export POSTGRES_USER # Fix false database connection on old instances if [ -f "/var/www/html/config/config.php" ]; then sleep 2 - while ! psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB" -c "select now()"; do + while ! sudo -u www-data psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB" -c "select now()"; do echo "Waiting for the database to start..." sleep 5 done @@ -28,8 +28,16 @@ if [ -n "$TRUSTED_CACERTS_DIR" ]; then update-ca-certificates fi +# Check datadir permissions +sudo -u www-data touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null +if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then + chown -R www-data:root "$NEXTCLOUD_DATA_DIR" + chmod 750 -R "$NEXTCLOUD_DATA_DIR" +fi +rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" + # Run original entrypoint -if ! bash /entrypoint.sh; then +if ! sudo -u www-data bash /entrypoint.sh; then exit 1 fi diff --git a/migration.md b/migration.md index 7649be6a..76498b2c 100644 --- a/migration.md +++ b/migration.md @@ -17,7 +17,7 @@ The procedure for migrating only the files works like this: 1. Restore the datadirectory of your former instance into the following directory: `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/` 1. Next, run `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` to apply the correct permissions 1. Start the containers again and wait until all containers are running -1. Run `sudo docker exec -it nextcloud-aio-nextcloud php occ files:scan-app-data && sudo docker exec -it nextcloud-aio-nextcloud php occ files:scan --all` in order to scan all files in the datadirectory. +1. Run `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan-app-data && sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all` in order to scan all files in the datadirectory. ## Migrate the files and the database **Please note**: this is much more complicated than migrating only the files and also not as failproof so be warned! diff --git a/readme.md b/readme.md index bfc991be..a24a9318 100644 --- a/readme.md +++ b/readme.md @@ -150,16 +150,16 @@ Afterwards it should work.
See https://dev.to/ozorest/fedora-32-how-to-solve-docker-internal-network-issue-22me for more details on this. This limitation is even mentioned on the official firewalld website: https://firewalld.org/#who-is-using-it ### How to run `occ` commands? -Simply run the following: `sudo docker exec -it nextcloud-aio-nextcloud php occ your-command`. Of course `your-command` needs to be exchanged with the command that you want to run. +Simply run the following: `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ your-command`. Of course `your-command` needs to be exchanged with the command that you want to run. ### How to resolve `Security & setup warnings displays the "missing default phone region" after initial install`? -Simply run the following command: `sudo docker exec -it nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="yourvalue"`. Of course you need to modify `yourvalue` based on your location. Examples are `DE`, `EN` and `GB`. See this list for more codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements +Simply run the following command: `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="yourvalue"`. Of course you need to modify `yourvalue` based on your location. Examples are `DE`, `EN` and `GB`. See this list for more codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements ### How to run multiple AIO instances on one server? See [multiple-instances.md](./multiple-instances.md) for some documentation on this. ### Bruteforce protection FAQ -Nextcloud features a built-in bruteforce protection which may get triggered and will block an ip-address or disable a user. You can unblock an ip-address by running `sudo docker exec -it nextcloud-aio-nextcloud php occ security:bruteforce:reset ` and enable a disabled user by running `sudo docker exec -it nextcloud-aio-nextcloud php occ user:enable `. See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#security for further information. +Nextcloud features a built-in bruteforce protection which may get triggered and will block an ip-address or disable a user. You can unblock an ip-address by running `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ security:bruteforce:reset ` and enable a disabled user by running `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ user:enable `. See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#security for further information. ### Update policy This project values stability over new features. That means that when a new major Nextcloud update gets introduced, we will wait at least until the first patch release, e.g. `24.0.1` is out before upgrading to it. Also we will wait with the upgrade until all important apps are compatible with the new major version. Minor or patch releases for Nextcloud and all dependencies as well as all containers will be updated to new versions as soon as possible but we try to give all updates first a good test round before pushing them. That means that it can take around 2 weeks before new updates reach the `latest` channel. If you want to help testing, you can switch to the `beta` channel by following [this documentation](#how-to-switch-the-channel) which will also give you the updates earlier. @@ -409,13 +409,6 @@ You can configure the Nextcloud container to use a specific directory on your ho ``` (The value `/host_mnt/c/your/data/path` in this example would be equivalent to `C:\your\data\path` on the Windows host. So you need to translate the path that you want to use into the correct format.) ⚠️️ **Attention**: Make sure that the path exists on the host before you create the volume! Otherwise everything will bug out! -⚠️ Please make sure to apply the correct permissions to the chosen directory before starting Nextcloud the first time (not needed on Windows). - -- In this example for Linux, the command for this would be `sudo chown -R 33:0 /mnt/ncdata` and `sudo chmod -R 750 /mnt/ncdata`. -- On macOS, the command for this would be `sudo chown -R 33:0 /var/nextcloud-data` and `sudo chmod -R 750 /var/nextcloud-data`. -- For Synology, the command for this example would be `sudo chown -R 33:0 /volume1/docker/nextcloud/data` and `sudo chmod -R 750 /volume1/docker/nextcloud/data` -- On Windows, this command is not needed. - ### How to allow the Nextcloud container to access directories on the host? By default, the Nextcloud container is confined and cannot access directories on the host OS. You might want to change this when you are planning to use local external storage in Nextcloud to store some files outside the data directory and can do so by adding the environmental variable `NEXTCLOUD_MOUNT` to the initial startup of the mastercontainer. Allowed values for that variable are strings that start with `/` and are not equal to `/`. @@ -450,7 +443,7 @@ When your containers run for a few days without a restart, the container logs th ### Access/Edit Nextcloud files/folders manually The files and folders that you add to Nextcloud are by default stored in the following directory: `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/` on the host. If needed, you can modify/add/delete files/folders there but **ATTENTION**: be very careful when doing so because you might corrupt your AIO installation! Best is to create a backup using the built-in backup solution before editing/changing files/folders in there because you will then be able to restore your instance to the backed up state. -After you are done modifying/adding/deleting files/folders, don't forget to apply the correct permissions by running: `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and rescan the files with `sudo docker exec -it nextcloud-aio-nextcloud php occ files:scan --all`. +After you are done modifying/adding/deleting files/folders, don't forget to apply the correct permissions by running: `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and rescan the files with `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all`. ### How to store the files/installation on a separate drive? You can move the whole docker library and all its files including all Nextcloud AIO files and folders to a separate drive by first mounting the drive in the host OS (NTFS is not supported) and then following this tutorial: https://www.guguweb.com/2019/02/07/how-to-move-docker-data-directory-to-another-location-on-ubuntu/
@@ -460,7 +453,7 @@ You can move the whole docker library and all its files including all Nextcloud You can edit Nextclouds config.php file directly from the host with your favorite text editor. E.g. like this: `sudo nano /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/config/config.php`. Make sure to not break the file though which might corrupt your Nextcloud instance otherwise. In best case, create a backup using the built-in backup solution before editing the file. ### Custom skeleton directory -If you want to define a custom skeleton directory, you can do so by putting your skeleton files into `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/skeleton/`, applying the correct permissions with `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/skeleton` and and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and setting the skeleton directory option with `sudo docker exec -it nextcloud-aio-nextcloud php occ config:system:set skeletondirectory --value="/mnt/ncdata/skeleton"`. You can read further on this option here: [click here](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=skeletondir#:~:text=adding%20%3Fdirect%3D1-,'skeletondirectory',-%3D%3E%20'%2Fpath%2Fto%2Fnextcloud) +If you want to define a custom skeleton directory, you can do so by putting your skeleton files into `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/skeleton/`, applying the correct permissions with `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/skeleton` and and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and setting the skeleton directory option with `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set skeletondirectory --value="/mnt/ncdata/skeleton"`. You can read further on this option here: [click here](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=skeletondir#:~:text=adding%20%3Fdirect%3D1-,'skeletondirectory',-%3D%3E%20'%2Fpath%2Fto%2Fnextcloud) ### Fail2ban You can configure your server to block certain ip-addresses using fail2ban as bruteforce protection. Here is how to set it up: https://docs.nextcloud.com/server/stable/admin_manual/installation/harden_server.html#setup-fail2ban. The logpath of AIO is by default `/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/data/nextcloud.log`. Do not forget to add `chain=DOCKER-USER` to your nextcloud jail config (`nextcloud.local`) otherwise the nextcloud service running on docker will still be accessible even if the IP is banned. Also, you may change the blocked ports to cover all AIO ports: by default `80,443,8080,8443,3478` (see [this](https://github.com/nextcloud/all-in-one#explanation-of-used-ports)) From 203b17d316b70673d83666aee5dd03dc11bc24a6 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 16 Oct 2022 13:07:22 +0200 Subject: [PATCH 0085/3949] improve rootless docs Signed-off-by: szaimen --- docker-rootless.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-rootless.md b/docker-rootless.md index 4bc6e6cd..00178131 100644 --- a/docker-rootless.md +++ b/docker-rootless.md @@ -11,4 +11,4 @@ You can run AIO with docker rootless by following the steps below. 1. Use the official AIO startup command but use `--volume $XDG_RUNTIME_DIR/docker.sock:/var/run/docker.sock:ro` instead of `--volume /var/run/docker.sock:/var/run/docker.sock:ro` and also add `-e DOCKER_SOCKET_PATH=$XDG_RUNTIME_DIR/docker.sock` to the initial container startup (which is needed for mastercontainer updates to work correctly). 1. Now everything should work like without docker rootless. You can consider using docker-compose for this or running it behind a reverse proxy. Basically the only thing that needs to be adjusted always in the startup command or docker-compose file (after installing docker rootles) are things that are mentioned in point 3. -**Please note:** All files outside the containers get created, written to and accessed as the user that is running the docker daemon or a subuid of it. So for the built-in backup to work you need to allow this user to write to the target directory. For changing Nextcloud's datadir, you need to adjust the permissions of the chosen folders to be accessible/writeable by the userid `100032:100032` (if running `grep ^$(whoami): /etc/subuid` as the user that is running the docker daemon returns 100000 as first value). This logically also applies to the NEXTCLOUD_MOUNT option. +**Please note:** All files outside the containers get created, written to and accessed as the user that is running the docker daemon or a subuid of it. So for the built-in backup to work you need to allow this user to write to the target directory. E.g. with `sudo chown -R USERNAME:GROUPNAME /mnt/backup`. The same applies when changing Nextcloud's datadir. E.g. `sudo chown -R USERNAME:GROUPNAME /mnt/ncdata`. When you want to use the NEXTCLOUD_MOUNT option for local external storage, you need to adjust the permissions of the chosen folders to be accessible/writeable by the userid `100032:100032` (if running `grep ^$(whoami): /etc/subuid` as the user that is running the docker daemon returns 100000 as first value). From 132b97ba201032557a5bdb2ebe9fe9702e5079eb Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 18 Oct 2022 23:50:16 +0200 Subject: [PATCH 0086/3949] add some guides for local dns server Signed-off-by: szaimen --- local-instance.md | 2 +- readme.md | 5 ++++- reverse-proxy.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/local-instance.md b/local-instance.md index ffc6380e..35f6d827 100644 --- a/local-instance.md +++ b/local-instance.md @@ -5,7 +5,7 @@ It is possible due to several reasons that you do not want or cannot open Nextcl The recommended way is the following: 1. Set up your domain correctly to point to your home network 1. Set up a reverse proxy by following the [reverse proxy documentation](./reverse-proxy.md) but only open port 80 (which is needed for the ACME challenge to work - however no real traffic will use this port). -1. Set up a local DNS-server like a pi-hole and configure it to be your local DNS-server for the whole network. Then in the Pi-hole interface, add a custom DNS-record for your domain and overwrite the A-record (and possibly the AAAA-record, too) to point to the local ip-address of your reverse proxy +1. Set up a local DNS-server like a pi-hole and configure it to be your local DNS-server for the whole network. Then in the Pi-hole interface, add a custom DNS-record for your domain and overwrite the A-record (and possibly the AAAA-record, too) to point to the local ip-address of your reverse proxy (see https://github.com/nextcloud/all-in-one#how-can-i-access-nextcloud-locally) 1. Enter the the ip-address of your local dns-server in the deamon.json file for docker so that you are sure that all docker containers use the correct local dns-server. 1. Now, entering the domain in the AIO-interface should work as expected and should allow you to continue with the setup diff --git a/readme.md b/readme.md index 0a11ecc8..5cc231cf 100644 --- a/readme.md +++ b/readme.md @@ -134,7 +134,10 @@ No and they will not be. Please use a dedicated domain for Nextcloud and set it No and it will not be added. Please use a dedicated domain for Nextcloud and set it up correctly by following the [reverse proxy documentation](./reverse-proxy.md). ### How can I access Nextcloud locally? -The recommended way is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. +The recommended way is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. Below are some guides: +- https://howchoo.com/pi/pi-hole-setup +- https://docs.callitkarma.me/posts/PiHole-Local-DNS/ +- https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/ ### How to skip the domain validation? If you are completely sure that you've configured everything correctly and are not able to pass the domain validation, you may skip the domain validation by adding `-e SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer. diff --git a/reverse-proxy.md b/reverse-proxy.md index 742e1b71..af13cc98 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -118,7 +118,7 @@ You can get AIO running using the ACME DNS-challenge. Here is how to do it. Of course you need to modify `` to the domain on which you want to run Nextcloud. You also need to adjust `` and `` to match your case. Also make sure to adjust the port 11000 to match the chosen APACHE_PORT. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `localhost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux) 1. Now continue with [point 2](#2-use-this-startup-command) but additionally, add `-e SKIP_DOMAIN_VALIDATION=true` to the docker run command which will disable the dommain validation (because it is known that the domain validation will not when using the DNS-challenge since no port is publicly opened. -**Advice:** In order to make it work in your home network, you may add the internal ipv4-address of your reverse proxy as A DNS-record to your domain and disable the dns-rebind-protection in your router. Another way it to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your reverse proxy. If both is not possible, you may add the domain to the hosts file which is needed then for any devices that shall use the server. +**Advice:** In order to make it work in your home network, you may add the internal ipv4-address of your reverse proxy as A DNS-record to your domain and disable the dns-rebind-protection in your router. Another way it to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your reverse proxy (see https://github.com/nextcloud/all-in-one#how-can-i-access-nextcloud-locally). If both is not possible, you may add the domain to the hosts file which is needed then for any devices that shall use the server.
From 8397ff50b4920083556372b9dbcb385a3c0b9e7c Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 18 Oct 2022 23:52:20 +0200 Subject: [PATCH 0087/3949] reverse the order Signed-off-by: szaimen --- readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 5cc231cf..c883ddad 100644 --- a/readme.md +++ b/readme.md @@ -135,9 +135,8 @@ No and it will not be added. Please use a dedicated domain for Nextcloud and set ### How can I access Nextcloud locally? The recommended way is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. Below are some guides: -- https://howchoo.com/pi/pi-hole-setup -- https://docs.callitkarma.me/posts/PiHole-Local-DNS/ - https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/ +- https://howchoo.com/pi/pi-hole-setup together with https://docs.callitkarma.me/posts/PiHole-Local-DNS/ ### How to skip the domain validation? If you are completely sure that you've configured everything correctly and are not able to pass the domain validation, you may skip the domain validation by adding `-e SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer. From be243fdba9e4198ba06098dc4cabb31e4e7fa21f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 12:31:59 +0000 Subject: [PATCH 0088/3949] Bump collabora/code in /Containers/collabora Bumps collabora/code from 22.05.6.3.1 to 22.05.7.2.1. --- updated-dependencies: - dependency-name: collabora/code dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/collabora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 0eab5a39..1487172b 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -1,5 +1,5 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker -FROM collabora/code:22.05.6.3.1 +FROM collabora/code:22.05.7.2.1 USER root From d4645d50ab0a43517f33aff5953b392ef431f2e1 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 24 Oct 2022 18:57:18 +0200 Subject: [PATCH 0089/3949] make nginx config more verbose Signed-off-by: szaimen --- reverse-proxy.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 242b661d..541a09c9 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -236,7 +236,10 @@ Of course you need to modify `` to the domain on which you want Add this to you nginx config: ``` -location / { +server { + listen 443 ssl; + server_name ; + location / { proxy_pass http://localhost:11000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; @@ -248,6 +251,10 @@ location / { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } + ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine + ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine +} + ``` and this to the http{...}-section in your nginx.conf: From 5c256564609b0c959a95c4cc6d9a2dc972411b70 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 24 Oct 2022 19:46:09 +0200 Subject: [PATCH 0090/3949] install borg from backports in the future Signed-off-by: szaimen --- Containers/borgbackup/Dockerfile | 2 +- Containers/borgbackup/backupscript.sh | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index 7922e28b..c1e2662c 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -3,8 +3,8 @@ FROM debian:bullseye-20221004-slim RUN set -ex; \ \ apt-get update; \ + apt-get install -y --no-install-recommends borgbackup -t bullseye-backports; \ apt-get install -y --no-install-recommends \ - borgbackup \ rsync \ fuse \ python3-llfuse \ diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index d2f61999..254c1fdc 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -155,6 +155,13 @@ if [ "$BORG_MODE" = backup ]; then exit 1 fi + # Compact archives + echo "Compacting the archives..." + if ! borg compact "$BORG_BACKUP_DIRECTORY"; then + echo "Failed to compact archives!" + exit 1 + fi + # Back up additional directories of the host if [ "$ADDITIONAL_DIRECTORIES_BACKUP" = 'yes' ]; then if [ -d "/docker_volumes/" ]; then @@ -172,11 +179,14 @@ if [ "$BORG_MODE" = backup ]; then echo "Backup of additional docker-volumes failed!" exit 1 fi - if ! borg prune --prefix '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then echo "Failed to prune additional docker-volumes archives!" exit 1 fi + if ! borg compact "$BORG_BACKUP_DIRECTORY"; then + echo "Failed to compact archives!" + exit 1 + fi fi if [ -d "/host_mounts/" ]; then EXCLUDED_DIRECTORIES=(home/*/.cache root/.cache var/cache lost+found run var/run dev tmp sys proc) @@ -200,6 +210,10 @@ if [ "$BORG_MODE" = backup ]; then echo "Failed to prune additional host-mount archives!" exit 1 fi + if ! borg compact "$BORG_BACKUP_DIRECTORY"; then + echo "Failed to compact archives!" + exit 1 + fi fi fi From f5102f856275cb0f78a1e2a16da0ab85ee27a6df Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 24 Oct 2022 20:41:56 +0200 Subject: [PATCH 0091/3949] add bullseye-backports to sources.list Signed-off-by: szaimen --- Containers/borgbackup/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index c1e2662c..de0c26bd 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -2,6 +2,7 @@ FROM debian:bullseye-20221004-slim RUN set -ex; \ \ + echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list; \ apt-get update; \ apt-get install -y --no-install-recommends borgbackup -t bullseye-backports; \ apt-get install -y --no-install-recommends \ From e5fce3eb890659b1033a6afa36f8a4a146edf7a5 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 24 Oct 2022 20:51:36 +0200 Subject: [PATCH 0092/3949] update OO Signed-off-by: szaimen --- Containers/onlyoffice/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/onlyoffice/Dockerfile b/Containers/onlyoffice/Dockerfile index 31c243d8..e71c8fae 100644 --- a/Containers/onlyoffice/Dockerfile +++ b/Containers/onlyoffice/Dockerfile @@ -1,4 +1,4 @@ # From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile -FROM onlyoffice/documentserver:7.2.0.204 +FROM onlyoffice/documentserver:7.2.1.34 HEALTHCHECK CMD curl -skfI localhost || exit 1 \ No newline at end of file From 62f129bdd27ece9eb0b0d16015cf3eda76e9a2e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 18:52:20 +0000 Subject: [PATCH 0093/3949] Bump docker in /Containers/mastercontainer Bumps docker from 20.10.18-dind-alpine3.16 to 20.10.20-dind-alpine3.16. --- updated-dependencies: - dependency-name: docker dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 308d3262..e61bbbed 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -1,5 +1,5 @@ # Docker CLI is a requirement -FROM docker:20.10.18-dind-alpine3.16 as dind +FROM docker:20.10.20-dind-alpine3.16 as dind # Caddy is a requirement FROM caddy:2.6.1-alpine as caddy From 8a71b4e9dc5fd504adf8997cb41a1a849b3a2144 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 12:41:17 +0000 Subject: [PATCH 0094/3949] Bump ubuntu from focal-20220922 to focal-20221019 in /Containers/talk Bumps ubuntu from focal-20220922 to focal-20221019. --- updated-dependencies: - dependency-name: ubuntu dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/talk/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index 7e0e9e27..d7b5e4dd 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220922 +FROM ubuntu:focal-20221019 RUN set -ex; \ \ From d41ae98de740e957ab8b0e0b24ffda0017d94ca9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 12:41:17 +0000 Subject: [PATCH 0095/3949] Bump debian in /Containers/borgbackup Bumps debian from bullseye-20221004-slim to bullseye-20221024-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/borgbackup/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index de0c26bd..eaf918a8 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-20221004-slim +FROM debian:bullseye-20221024-slim RUN set -ex; \ \ From 9daecad5b3ccccf87e2610b0272df22f5312bd79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 12:41:23 +0000 Subject: [PATCH 0096/3949] Bump debian in /Containers/apache Bumps debian from bullseye-20221004-slim to bullseye-20221024-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index 26be8471..b898be2b 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,7 +1,7 @@ # Caddy is a requirement FROM caddy:2.6.2-alpine as caddy -FROM debian:bullseye-20221004-slim +FROM debian:bullseye-20221024-slim RUN mkdir -p /mnt/data; \ chown www-data:www-data /mnt/data; From e1ec9c738d81e4ac64acfefc2c0c368471fa38ef Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 25 Oct 2022 18:13:16 +0200 Subject: [PATCH 0097/3949] update one-click settings Signed-off-by: szaimen --- Containers/nextcloud/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index ac3cabe4..f434c909 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -307,6 +307,8 @@ fi echo "Applying one-click-instance settings..." php /var/www/html/occ config:system:set one-click-instance --value=true --type=bool php /var/www/html/occ config:system:set one-click-instance.user-limit --value=100 --type=int +php /var/www/html/occ config:system:set one-click-instance.link --value="https://nextcloud.com/all-in-one/" +php /var/www/html/occ app:enable support # Adjusting log files to be stored on a volume echo "Adjusting log files..." From fa6a238d1600e2ddc9b3ad07c038aa21ea290c85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:36:26 +0000 Subject: [PATCH 0098/3949] Bump guzzlehttp/psr7 from 2.4.1 to 2.4.2 in /php Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.4.1 to 2.4.2. - [Release notes](https://github.com/guzzle/psr7/releases) - [Changelog](https://github.com/guzzle/psr7/blob/master/CHANGELOG.md) - [Commits](https://github.com/guzzle/psr7/compare/2.4.1...2.4.2) --- updated-dependencies: - dependency-name: guzzlehttp/psr7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- php/composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index 458d1dce..7fe6798b 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -220,16 +220,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "3148458748274be1546f8f2809a6c09fe66f44aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/3148458748274be1546f8f2809a6c09fe66f44aa", + "reference": "3148458748274be1546f8f2809a6c09fe66f44aa", "shasum": "" }, "require": { @@ -319,7 +319,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.2" }, "funding": [ { @@ -335,7 +335,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-10-25T13:49:28+00:00" }, { "name": "http-interop/http-factory-guzzle", From 2faa1357d39a20083748f8c669628c0c2db5f904 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:41:22 +0000 Subject: [PATCH 0099/3949] Bump docker in /Containers/mastercontainer Bumps docker from 20.10.20-dind-alpine3.16 to 20.10.21-dind-alpine3.16. --- updated-dependencies: - dependency-name: docker dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 0678a7ca..cb0554d7 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -1,5 +1,5 @@ # Docker CLI is a requirement -FROM docker:20.10.20-dind-alpine3.16 as dind +FROM docker:20.10.21-dind-alpine3.16 as dind # Caddy is a requirement FROM caddy:2.6.2-alpine as caddy From e92daa62bfec44c8825374a6663b16b95256cd46 Mon Sep 17 00:00:00 2001 From: Brian Philipp <66728496+BR14Nx@users.noreply.github.com> Date: Wed, 26 Oct 2022 17:50:04 +0200 Subject: [PATCH 0100/3949] Hint about custom datadirectory path Signed-off-by: Brian Philipp <66728496+BR14Nx@users.noreply.github.com> --- migration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration.md b/migration.md index 7649be6a..f4b8cb52 100644 --- a/migration.md +++ b/migration.md @@ -72,8 +72,8 @@ The procedure for migrating the files and the database works like this: sudo chmod 777 /var/lib/docker/volumes/nextcloud_aio_database_dump/_data/database-dump.sql sudo rm /var/lib/docker/volumes/nextcloud_aio_database_dump/_data/initial-cleanup-done ``` -1. If the commands above were executed successfully, restore the datadirectory of your former instance into the following directory: `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/` -1. Next, run `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*`to apply the correct permissions +1. If the commands above were executed successfully, restore the datadirectory of your former instance into your datadirectory: `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/`. Be aware if you have changed the standard path of your datadirectory like described [here](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir). +1. Next, run `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*`to apply the correct permissions on the datadirectory. 1. Edit the Nextcloud AIO config.php file that is stored in `/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/config/config.php` and modify only `passwordsalt`, `secret`, `instanceid` and set it to the old values that you used on your old installation. If you are brave, feel free to modify further values e.g. add your old LDAP config or S3 storage config. (Some things like Mail server config can be added back using Nextcloud's webinterface later on). 1. When you are done and saved your changes to the file, finally start the containers again and wait until all containers are running. 1. As last step, install all apps again that were installed before on your old instance by using the webinterface. From d01a1087fa69d2517134a395cd79a7f0eb60a105 Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 26 Oct 2022 19:30:15 +0200 Subject: [PATCH 0101/3949] prettify json and unescape slashes Signed-off-by: szaimen --- php/src/Data/ConfigurationManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index deb601ef..b1f3b560 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -443,7 +443,7 @@ class ConfigurationManager if ($df !== false && (int)$df < 10240) { throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not have enough space for writing the config file! Not writing it back!"); } - file_put_contents(DataConst::GetConfigFile(), json_encode($config)); + file_put_contents(DataConst::GetConfigFile(), json_encode($config, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT)); } private function GetEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string { From b9ada72be3d83e6ac83201b571d0d071c374d14d Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 12:35:42 +0200 Subject: [PATCH 0102/3949] address missing points Signed-off-by: szaimen --- Containers/nextcloud/notify.sh | 2 +- Containers/nextcloud/start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/notify.sh b/Containers/nextcloud/notify.sh index f6090626..71768a23 100644 --- a/Containers/nextcloud/notify.sh +++ b/Containers/nextcloud/notify.sh @@ -1,7 +1,7 @@ #!/bin/bash if [[ "$EUID" = 0 ]]; then - sudo -u www-data -s + sudo -u www-data -sE fi SUBJECT="$1" diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 0d32c0d2..8ca26e70 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -34,7 +34,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then chown -R www-data:root "$NEXTCLOUD_DATA_DIR" chmod 750 -R "$NEXTCLOUD_DATA_DIR" fi -rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" +sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" # Run original entrypoint if ! sudo -u www-data bash /entrypoint.sh; then From 4b10fcada204c36d64acd354cb8dd7d3076f5ed0 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 24 Oct 2022 21:38:17 +0200 Subject: [PATCH 0103/3949] use the add commands to add talk settings Signed-off-by: szaimen --- Containers/nextcloud/entrypoint.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 9655c0b0..7e2cbea1 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -398,12 +398,16 @@ if [ "$TALK_ENABLED" = 'yes' ]; then else php /var/www/html/occ app:update spreed fi - STUN_SERVERS="[\"$NC_DOMAIN:$TALK_PORT\"]" - TURN_SERVERS="[{\"server\":\"$NC_DOMAIN:$TALK_PORT\",\"secret\":\"$TURN_SECRET\",\"protocols\":\"udp,tcp\"}]" - SIGNALING_SERVERS="{\"servers\":[{\"server\":\"https://$NC_DOMAIN/standalone-signaling/\",\"verify\":true}],\"secret\":\"$SIGNALING_SECRET\"}" - php /var/www/html/occ config:app:set spreed stun_servers --value="$STUN_SERVERS" --output json - php /var/www/html/occ config:app:set spreed turn_servers --value="$TURN_SERVERS" --output json - php /var/www/html/occ config:app:set spreed signaling_servers --value="$SIGNALING_SERVERS" --output json + # Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435 + if ! php /var/www/html/occ talk:turn:list --output="plain" | grep -q "$NC_DOMAIN:$TALK_PORT"; then + php /var/www/html/occ talk:turn:add "$NC_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET" + fi + if ! php /var/www/html/occ talk:stun:list --output="plain" | grep -q "$NC_DOMAIN:$TALK_PORT"; then + php /var/www/html/occ talk:stun:add "$NC_DOMAIN:$TALK_PORT" + fi + if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$NC_DOMAIN/standalone-signaling/"; then + php /var/www/html/occ talk:signaling:add "https://$NC_DOMAIN/standalone-signaling/" "$SIGNALING_SECRET" --validate-ssh-certificate + fi else if [ -d "/var/www/html/custom_apps/spreed" ]; then php /var/www/html/occ app:remove spreed From f8a1c1862a072b0e0887081e69cf4f6eabc765cc Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 25 Oct 2022 21:03:10 +0200 Subject: [PATCH 0104/3949] address review Signed-off-by: szaimen --- Containers/nextcloud/Dockerfile | 1 + Containers/nextcloud/entrypoint.sh | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index f2398570..2ef874b5 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -203,6 +203,7 @@ RUN set -ex; \ tzdata \ mawk \ sudo \ + grep \ ; \ rm -rf /var/lib/apt/lists/* diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 7e2cbea1..fa736390 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -399,14 +399,15 @@ if [ "$TALK_ENABLED" = 'yes' ]; then php /var/www/html/occ app:update spreed fi # Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435 - if ! php /var/www/html/occ talk:turn:list --output="plain" | grep -q "$NC_DOMAIN:$TALK_PORT"; then + if [ -z "$(php /var/www/html/occ talk:turn:list --output="plain")" ]; then php /var/www/html/occ talk:turn:add "$NC_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET" fi - if ! php /var/www/html/occ talk:stun:list --output="plain" | grep -q "$NC_DOMAIN:$TALK_PORT"; then + if php /var/www/html/occ talk:stun:list --output="plain" | grep -oP '[a-zA-Z.:0-9]+' | grep -q "^stun.nextcloud.com:443$"; then php /var/www/html/occ talk:stun:add "$NC_DOMAIN:$TALK_PORT" + php /var/www/html/occ talk:stun:delete "stun.nextcloud.com:443" fi if ! php /var/www/html/occ talk:signaling:list --output="plain" | grep -q "https://$NC_DOMAIN/standalone-signaling/"; then - php /var/www/html/occ talk:signaling:add "https://$NC_DOMAIN/standalone-signaling/" "$SIGNALING_SECRET" --validate-ssh-certificate + php /var/www/html/occ talk:signaling:add "https://$NC_DOMAIN/standalone-signaling/" "$SIGNALING_SECRET" --verify fi else if [ -d "/var/www/html/custom_apps/spreed" ]; then From 201dbc15ae5b6561988aa3bbde7874297d4f1d94 Mon Sep 17 00:00:00 2001 From: TheManchineel <37479927+TheManchineel@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:30:38 +0200 Subject: [PATCH 0105/3949] Rework NGINX reverse proxy docs to support CODE As per PR #1236, applied the same documentation change to the NGINX configuration, so as to pass the full URI of each HTTP request to the Collabora Online backend. This fixes #834 but for NGINX rather than Apache. It might be necessary to make similar changes to other proxy software, but NGINX is what I am familiar with. Signed-off-by: TheManchineel <37479927+TheManchineel@users.noreply.github.com> --- reverse-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 541a09c9..c9e5508b 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -240,7 +240,7 @@ server { listen 443 ssl; server_name ; location / { - proxy_pass http://localhost:11000; + proxy_pass http://localhost:11000$request_uri; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; From 87192838e8e72729b652b53cb733903cb0fce024 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 13:04:45 +0200 Subject: [PATCH 0106/3949] improve detail Signed-off-by: szaimen --- .github/workflows/shellcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 9b80cf3f..c85dc22f 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -8,7 +8,7 @@ on: jobs: shellcheck: - name: Github Actions + name: Check Shell runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From e81c4e30418e613a9e98ffc5f47f8347bd18435f Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 13:50:26 +0200 Subject: [PATCH 0107/3949] skip app update if backup was restored or comparable Signed-off-by: szaimen --- Containers/nextcloud/entrypoint.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 9655c0b0..97569fa0 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -279,6 +279,8 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then bash /notify.sh "Your apps just got updated!" "$UPDATED_APPS" fi fi +else + SKIP_UPDATE=1 fi # Check if appdata is present @@ -341,7 +343,7 @@ if ! [ -d "/var/www/html/custom_apps/notify_push" ]; then php /var/www/html/occ app:install notify_push elif [ "$(php /var/www/html/occ config:app:get notify_push enabled)" = "no" ]; then php /var/www/html/occ app:enable notify_push -else +elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update notify_push fi php /var/www/html/occ config:system:set trusted_proxies 0 --value="127.0.0.1" @@ -354,7 +356,7 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then php /var/www/html/occ app:install richdocuments elif [ "$(php /var/www/html/occ config:app:get richdocuments enabled)" = "no" ]; then php /var/www/html/occ app:enable richdocuments - else + elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update richdocuments fi php /var/www/html/occ config:app:set richdocuments wopi_url --value="https://$NC_DOMAIN/" @@ -376,7 +378,7 @@ if [ "$ONLYOFFICE_ENABLED" = 'yes' ]; then php /var/www/html/occ app:install onlyoffice elif [ "$(php /var/www/html/occ config:app:get onlyoffice enabled)" = "no" ]; then php /var/www/html/occ app:enable onlyoffice - else + elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update onlyoffice fi php /var/www/html/occ config:system:set onlyoffice jwt_secret --value="$ONLYOFFICE_SECRET" @@ -395,7 +397,7 @@ if [ "$TALK_ENABLED" = 'yes' ]; then php /var/www/html/occ app:install spreed elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" = "no" ]; then php /var/www/html/occ app:enable spreed - else + elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update spreed fi STUN_SERVERS="[\"$NC_DOMAIN:$TALK_PORT\"]" @@ -420,7 +422,7 @@ if [ "$CLAMAV_ENABLED" = 'yes' ]; then php /var/www/html/occ app:install files_antivirus elif [ "$(php /var/www/html/occ config:app:get files_antivirus enabled)" = "no" ]; then php /var/www/html/occ app:enable files_antivirus - else + elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update files_antivirus fi php /var/www/html/occ config:app:set files_antivirus av_mode --value="daemon" @@ -456,21 +458,21 @@ if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then php /var/www/html/occ app:install fulltextsearch elif [ "$(php /var/www/html/occ config:app:get fulltextsearch enabled)" = "no" ]; then php /var/www/html/occ app:enable fulltextsearch - else + elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update fulltextsearch fi if ! [ -d "/var/www/html/custom_apps/fulltextsearch_elasticsearch" ]; then php /var/www/html/occ app:install fulltextsearch_elasticsearch elif [ "$(php /var/www/html/occ config:app:get fulltextsearch_elasticsearch enabled)" = "no" ]; then php /var/www/html/occ app:enable fulltextsearch_elasticsearch - else + elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update fulltextsearch_elasticsearch fi if ! [ -d "/var/www/html/custom_apps/files_fulltextsearch" ]; then php /var/www/html/occ app:install files_fulltextsearch elif [ "$(php /var/www/html/occ config:app:get files_fulltextsearch enabled)" = "no" ]; then php /var/www/html/occ app:enable files_fulltextsearch - else + elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update files_fulltextsearch fi php /var/www/html/occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"}' From 31a16535fe4df6bdddf14423c6fea1319678303b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Oct 2022 12:23:27 +0000 Subject: [PATCH 0108/3949] Bump guzzlehttp/psr7 from 2.4.2 to 2.4.3 in /php Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.4.2 to 2.4.3. - [Release notes](https://github.com/guzzle/psr7/releases) - [Changelog](https://github.com/guzzle/psr7/blob/master/CHANGELOG.md) - [Commits](https://github.com/guzzle/psr7/compare/2.4.2...2.4.3) --- updated-dependencies: - dependency-name: guzzlehttp/psr7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- php/composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index 7fe6798b..5bf60037 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -220,16 +220,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.4.2", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "3148458748274be1546f8f2809a6c09fe66f44aa" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/3148458748274be1546f8f2809a6c09fe66f44aa", - "reference": "3148458748274be1546f8f2809a6c09fe66f44aa", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -319,7 +319,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.2" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -335,7 +335,7 @@ "type": "tidelift" } ], - "time": "2022-10-25T13:49:28+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "http-interop/http-factory-guzzle", From 12f62205912c23b9cb2404d7dc8a9c9ea0c327e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Oct 2022 12:43:04 +0000 Subject: [PATCH 0109/3949] Bump elasticsearch from 7.17.6 to 7.17.7 in /Containers/fulltextsearch Bumps elasticsearch from 7.17.6 to 7.17.7. --- updated-dependencies: - dependency-name: elasticsearch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/fulltextsearch/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/fulltextsearch/Dockerfile b/Containers/fulltextsearch/Dockerfile index c789a72e..9569eb65 100644 --- a/Containers/fulltextsearch/Dockerfile +++ b/Containers/fulltextsearch/Dockerfile @@ -1,5 +1,5 @@ # Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile -FROM elasticsearch:7.17.6 +FROM elasticsearch:7.17.7 RUN elasticsearch-plugin install --batch ingest-attachment From 24eefc7009fe51bd402f3add5c55377455345944 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 15:22:47 +0200 Subject: [PATCH 0110/3949] increase to 2.1.0 Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index d698abb9..a6d3f4bd 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.0.4

+

Nextcloud AIO v2.1.0

{# Add 2nd tab warning #} From 6458bf661314fae49f255506254fa6f17712c1a5 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 15:58:40 +0200 Subject: [PATCH 0111/3949] fix chaning to root user Signed-off-by: szaimen --- Containers/nextcloud/Dockerfile | 2 +- Containers/nextcloud/start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 2ef874b5..4a68eb3e 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -253,6 +253,6 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd USER root ENTRYPOINT ["/start.sh"] -CMD ["sudo", "-u", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] +CMD ["sudo", "-uE", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] HEALTHCHECK CMD (sudo -u www-data nc -z localhost 9000 && sudo -u www-data nc -z localhost 7867) || exit 1 \ No newline at end of file diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 8ca26e70..53bf29b0 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -37,7 +37,7 @@ fi sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" # Run original entrypoint -if ! sudo -u www-data bash /entrypoint.sh; then +if ! sudo -uE www-data bash /entrypoint.sh; then exit 1 fi From a03fad2c335348af7ea3cec1845e613a9ef0dbf7 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 16:11:09 +0200 Subject: [PATCH 0112/3949] fix sudo command Signed-off-by: szaimen --- Containers/nextcloud/Dockerfile | 2 +- Containers/nextcloud/notify.sh | 2 +- Containers/nextcloud/start.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 4a68eb3e..94ea63b0 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -253,6 +253,6 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd USER root ENTRYPOINT ["/start.sh"] -CMD ["sudo", "-uE", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] +CMD ["sudo", "-E", "-u", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] HEALTHCHECK CMD (sudo -u www-data nc -z localhost 9000 && sudo -u www-data nc -z localhost 7867) || exit 1 \ No newline at end of file diff --git a/Containers/nextcloud/notify.sh b/Containers/nextcloud/notify.sh index 71768a23..f782f315 100644 --- a/Containers/nextcloud/notify.sh +++ b/Containers/nextcloud/notify.sh @@ -1,7 +1,7 @@ #!/bin/bash if [[ "$EUID" = 0 ]]; then - sudo -u www-data -sE + sudo -u www-data -s -E fi SUBJECT="$1" diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 53bf29b0..8dcdb148 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -37,7 +37,7 @@ fi sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" # Run original entrypoint -if ! sudo -uE www-data bash /entrypoint.sh; then +if ! sudo -E -u www-data bash /entrypoint.sh; then exit 1 fi From a547f1d89257bcd7df18b9479f3dba9ddd79f667 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 18:23:16 +0200 Subject: [PATCH 0113/3949] another attempt Signed-off-by: szaimen --- Containers/nextcloud/Dockerfile | 4 ---- Containers/nextcloud/supervisord.conf | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 94ea63b0..13d93a67 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -227,15 +227,12 @@ RUN set -ex; \ chown www-data:root -R /usr/src && \ chown www-data:root -R /usr/local/etc/php/conf.d && \ chown www-data:root -R /usr/local/etc/php-fpm.d && \ - chown www-data:root -R /var/log/supervisord/ && \ - chown www-data:root -R /var/run/supervisord/ && \ rm -r /usr/src/nextcloud/apps/updatenotification COPY start.sh / COPY notify.sh / RUN set -ex; \ chmod +x /start.sh && \ - chmod +r /supervisord.conf && \ chmod +x /entrypoint.sh && \ chmod +r /upgrade.exclude && \ chmod +x /cron.sh && \ @@ -253,6 +250,5 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd USER root ENTRYPOINT ["/start.sh"] -CMD ["sudo", "-E", "-u", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] HEALTHCHECK CMD (sudo -u www-data nc -z localhost 9000 && sudo -u www-data nc -z localhost 7867) || exit 1 \ No newline at end of file diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf index f411e59b..e376deaa 100644 --- a/Containers/nextcloud/supervisord.conf +++ b/Containers/nextcloud/supervisord.conf @@ -14,6 +14,7 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=php-fpm +user=www-data [program:cron] stdout_logfile=/dev/stdout @@ -21,6 +22,7 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=/cron.sh +user=www-data [program:notify-push] stdout_logfile=/dev/stdout @@ -28,6 +30,7 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=/var/www/html/custom_apps/notify_push/bin/%(ENV_CPU_ARCH)s/notify_push /var/www/html/config/config.php --port 7867 --redis-url redis://:%(ENV_REDIS_HOST_PASSWORD)s@%(ENV_REDIS_HOST)s +user=www-data [program:activate-collabora] stdout_logfile=/dev/stdout @@ -35,3 +38,4 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=/activate-collabora.sh +user=www-data From db5cab9e34304bc5636969c3cdfad872d296152c Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 18:51:51 +0200 Subject: [PATCH 0114/3949] fix it! Signed-off-by: szaimen --- Containers/nextcloud/supervisord.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf index e376deaa..a26f8d8c 100644 --- a/Containers/nextcloud/supervisord.conf +++ b/Containers/nextcloud/supervisord.conf @@ -14,7 +14,6 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=php-fpm -user=www-data [program:cron] stdout_logfile=/dev/stdout From a0dc8781a7af4685b29c01750c1f908d57006aa9 Mon Sep 17 00:00:00 2001 From: Zoey Date: Thu, 27 Oct 2022 22:07:34 +0200 Subject: [PATCH 0115/3949] improve nginx reverse proxy documnetation Signed-off-by: Zoey --- reverse-proxy.md | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index c9e5508b..0ba92e0e 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -237,22 +237,42 @@ Add this to you nginx config: ``` server { - listen 443 ssl; + listen 80; +# listen [::]:80; # uncomment to use IPv6 + + if ($scheme = "http") { + return 301 https://$host$request_uri; + } + + listen 443 ssl http2; +# listen [::]:443 ssl http2; # uncomment to use IPv6 + server_name ; + location / { - proxy_pass http://localhost:11000$request_uri; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - client_max_body_size 0; + proxy_pass http://localhost:11000$request_uri; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + client_max_body_size 0; # Websocket - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; } - ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine - ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine + + ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine + ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine + + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; # about 40000 sessions + ssl_session_tickets off; + + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + ssl_prefer_server_ciphers off; } ``` From 39f7874ea7b822c89c8d9322a08eb6991dee1280 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Fri, 28 Oct 2022 04:50:20 +0000 Subject: [PATCH 0116/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index f6d5a2ab..afa54e7b 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -30,12 +30,6 @@ $args $args - - $request->getParsedBody()['selected_restore_time'] - - - $request->getParsedBody()['selected_restore_time'] - @@ -43,15 +37,6 @@ $args $args - - $request->getParsedBody()['password'] - - - $password - - - $request->getParsedBody()['password'] - @@ -64,11 +49,6 @@ $container->GetInternalPorts() !== null - - - withStatus - - $object From b7708b66dfd9c55f4039627c982b0a16234e3c18 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 28 Oct 2022 17:06:44 +0200 Subject: [PATCH 0117/3949] optimize nginx reverse proxy documentation With this change, it is not needed to change the main http block Signed-off-by: Zoey --- reverse-proxy.md | 59 +++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 0ba92e0e..6affb824 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -236,58 +236,51 @@ Of course you need to modify `` to the domain on which you want Add this to you nginx config: ``` +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + server { listen 80; # listen [::]:80; # uncomment to use IPv6 - + if ($scheme = "http") { - return 301 https://$host$request_uri; + return 301 https://$host$request_uri; } listen 443 ssl http2; # listen [::]:443 ssl http2; # uncomment to use IPv6 - + server_name ; - + location / { - proxy_pass http://localhost:11000$request_uri; - - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - client_max_body_size 0; + proxy_pass http://localhost:11000$request_uri; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + client_max_body_size 0; # Websocket - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; } - - ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine - ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine - + + ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine + ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine + ssl_session_timeout 1d; - ssl_session_cache shared:MozSSL:10m; # about 40000 sessions + ssl_session_cache shared:MozSSL:10m; # about 40000 sessions ssl_session_tickets off; - - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off; } ``` -and this to the http{...}-section in your nginx.conf: - -``` - ## - # Connection header for WebSocket reverse proxy - ## - map $http_upgrade $connection_upgrade { - default upgrade; - '' close; - } -``` -(otherwise nginx will fail to start with a message saying the variable named connection_upgrade does not exist) Of course you need to modify `` to the domain on which you want to run Nextcloud. Also make sure to adjust the port 11000 to match the chosen APACHE_PORT. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` option (or `network_mode: host` for docker-compose) when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `localhost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux) From 3616ce48a98302d35a7bc76dd1ecc37edbab54e0 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 30 Oct 2022 02:12:06 +0200 Subject: [PATCH 0118/3949] fix the notify script Signed-off-by: szaimen --- Containers/nextcloud/notify.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Containers/nextcloud/notify.sh b/Containers/nextcloud/notify.sh index f782f315..f74ec16b 100644 --- a/Containers/nextcloud/notify.sh +++ b/Containers/nextcloud/notify.sh @@ -1,23 +1,25 @@ #!/bin/bash if [[ "$EUID" = 0 ]]; then - sudo -u www-data -s -E + COMMAND=(sudo -E -u www-data php /var/www/html/occ) +else + COMMAND=(php /var/www/html/occ) fi SUBJECT="$1" MESSAGE="$2" -if [ "$(php /var/www/html/occ config:app:get notifications enabled)" = "no" ]; then +if [ "$("${COMMAND[@]}" config:app:get notifications enabled)" = "no" ]; then echo "Cannot send notification as notification app is not enabled." exit 1 fi echo "Posting notifications to users that are admins..." -NC_USERS=$(php /var/www/html/occ user:list | sed 's|^ - ||g' | sed 's|:.*||') +NC_USERS=$("${COMMAND[@]}" user:list | sed 's|^ - ||g' | sed 's|:.*||') mapfile -t NC_USERS <<< "$NC_USERS" for user in "${NC_USERS[@]}" do - if php /var/www/html/occ user:info "$user" | cut -d "-" -f2 | grep -x -q " admin" + if "${COMMAND[@]}" user:info "$user" | cut -d "-" -f2 | grep -x -q " admin" then NC_ADMIN_USER+=("$user") fi @@ -26,7 +28,7 @@ done for admin in "${NC_ADMIN_USER[@]}" do echo "Posting '$SUBJECT' to: $admin" - php /var/www/html/occ notification:generate "$admin" "$NC_DOMAIN: $SUBJECT" -l "$MESSAGE" + "${COMMAND[@]}" notification:generate "$admin" "$NC_DOMAIN: $SUBJECT" -l "$MESSAGE" done echo "Done!" From adb4279de1bfe9abe8077d891232edc33143de9b Mon Sep 17 00:00:00 2001 From: szaimen Date: Sun, 30 Oct 2022 02:02:46 +0200 Subject: [PATCH 0119/3949] improve logging situation Signed-off-by: szaimen --- Containers/apache/nextcloud.conf | 2 ++ Containers/mastercontainer/Dockerfile | 2 +- Containers/mastercontainer/mastercontainer.conf | 2 ++ Containers/mastercontainer/supervisord.conf | 12 ++++++++---- Containers/nextcloud/supervisord.conf | 6 ++++-- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index 503dafce..7a0b46b2 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -1,5 +1,7 @@ Listen 8000 + ServerName localhost + # Add error log CustomLog ${APACHE_LOG_DIR}/access.log combined ErrorLog ${APACHE_LOG_DIR}/error.log diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index cb0554d7..7f4a3869 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -52,7 +52,7 @@ RUN set -e && \ cd ..; \ rm -f /usr/local/bin/composer; \ chmod 770 -R ./; \ - chown www-data:www-data -R ./; \ + chown www-data:www-data -R /var/www; \ rm -r ./php/data; \ rm -r ./php/session diff --git a/Containers/mastercontainer/mastercontainer.conf b/Containers/mastercontainer/mastercontainer.conf index 3185f911..b343af32 100644 --- a/Containers/mastercontainer/mastercontainer.conf +++ b/Containers/mastercontainer/mastercontainer.conf @@ -11,6 +11,8 @@ ErrorLog ${APACHE_LOG_DIR}/error.log # Http host + ServerName localhost + # PHP match SetHandler application/x-httpd-php diff --git a/Containers/mastercontainer/supervisord.conf b/Containers/mastercontainer/supervisord.conf index aea8aaa0..5072586c 100644 --- a/Containers/mastercontainer/supervisord.conf +++ b/Containers/mastercontainer/supervisord.conf @@ -1,26 +1,28 @@ [supervisord] nodaemon=true -nodaemon=true logfile=/var/log/supervisord/supervisord.log pidfile=/var/run/supervisord/supervisord.pid childlogdir=/var/log/supervisord/ logfile_maxbytes=50MB logfile_backups=10 loglevel=error +user=root [program:apache] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 +# stdout_logfile=/dev/stdout +# stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=apache2-foreground +user=root [program:caddy] stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=sudo -u www-data /usr/bin/caddy run --config /Caddyfile +command=/usr/bin/caddy run --config /Caddyfile +user=www-data [program:cron] stdout_logfile=/dev/stdout @@ -35,6 +37,7 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=/backup-time-file-watcher.sh +user=root [program:session-deduplicator] stdout_logfile=/dev/stdout @@ -42,3 +45,4 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=/session-deduplicator.sh +user=root diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf index a26f8d8c..d6476d44 100644 --- a/Containers/nextcloud/supervisord.conf +++ b/Containers/nextcloud/supervisord.conf @@ -7,13 +7,15 @@ childlogdir=/var/log/supervisord/ logfile_maxbytes=50MB ; maximum size of logfile before rotation logfile_backups=10 ; number of backed up logfiles loglevel=error +user=root [program:php-fpm] stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +# stderr_logfile=/dev/stderr +# stderr_logfile_maxbytes=0 command=php-fpm +user=root [program:cron] stdout_logfile=/dev/stdout From 77613f456caf80335528fccad4d1c63d8f8546a8 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 31 Oct 2022 11:49:37 +0100 Subject: [PATCH 0120/3949] Make sure that the sites are really gone Signed-off-by: szaimen --- Containers/apache/Dockerfile | 4 ++++ Containers/mastercontainer/Dockerfile | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index b898be2b..2abf26ef 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -46,6 +46,10 @@ RUN rm /etc/apache2/ports.conf; \ RUN set -ex; \ a2dissite 000-default && \ a2dissite default-ssl && \ + rm -f /etc/apache2/sites-enabled/000-default.conf && \ + rm -f /etc/apache2/sites-enabled/default-ssl.conf && \ + rm /etc/apache2/sites-available/000-default.conf && \ + rm /etc/apache2/sites-available/default-ssl.conf && \ a2ensite nextcloud.conf && \ rm -rf /var/www/html/* && \ chown www-data:www-data -R /var/log/apache2; \ diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index cb0554d7..64f1c9b7 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -76,8 +76,13 @@ RUN rm /etc/apache2/ports.conf; \ sed -s -i -e "s/Include ports.conf//" /etc/apache2/apache2.conf; \ sed -i "/^Listen /d" /etc/apache2/apache2.conf -RUN a2dissite 000-default && \ +RUN set -ex; \ + a2dissite 000-default && \ a2dissite default-ssl && \ + rm -f /etc/apache2/sites-enabled/000-default.conf && \ + rm -f /etc/apache2/sites-enabled/default-ssl.conf && \ + rm /etc/apache2/sites-available/000-default.conf && \ + rm /etc/apache2/sites-available/default-ssl.conf && \ a2ensite mastercontainer.conf RUN mkdir /var/log/supervisord; \ From 0e60c52b912165fe0f25ffe45495e6ef57de6b48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Oct 2022 12:45:15 +0000 Subject: [PATCH 0121/3949] Bump php in /Containers/nextcloud Bumps php from 8.0.24-fpm-alpine3.16 to 8.0.25-fpm-alpine3.16. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 13d93a67..3288448d 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/nextcloud/docker/blob/master/23/fpm-alpine/Dockerfile -FROM php:8.0.24-fpm-alpine3.16 +FROM php:8.0.25-fpm-alpine3.16 # Custom: change id of www-data user as it needs to be the same like on old installations RUN set -ex; \ From d767ec65d9f13a217ea71ecd62ad3edf9eb41cf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Oct 2022 12:45:17 +0000 Subject: [PATCH 0122/3949] Bump php in /Containers/mastercontainer Bumps php from 8.0.24-apache-bullseye to 8.0.25-apache-bullseye. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index cb0554d7..32eb9cec 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -5,7 +5,7 @@ FROM docker:20.10.21-dind-alpine3.16 as dind FROM caddy:2.6.2-alpine as caddy # From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile -FROM php:8.0.24-apache-bullseye +FROM php:8.0.25-apache-bullseye EXPOSE 80 EXPOSE 8080 From 982f7644f5535d01156df91b13b0c8b26d9059e3 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 31 Oct 2022 15:15:05 +0100 Subject: [PATCH 0123/3949] increase to 2.1.1 Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index a6d3f4bd..b7171ed0 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.1.0

+

Nextcloud AIO v2.1.1

{# Add 2nd tab warning #} From 968103ee45cd546ecfccb98103cee9fa162df704 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 13:44:54 +0000 Subject: [PATCH 0124/3949] Bump nextcloud/imaginary in /Containers/imaginary Bumps nextcloud/imaginary from 20221003 to 20221101. --- updated-dependencies: - dependency-name: nextcloud/imaginary dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Containers/imaginary/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index a3e7c94c..32a35a85 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/h2non/imaginary/blob/master/Dockerfile -FROM nextcloud/imaginary:20221003 +FROM nextcloud/imaginary:20221101 USER root RUN set -ex; \ From 3bba9da0d57578be5e9691244e9d4ef507382d34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Nov 2022 12:37:17 +0000 Subject: [PATCH 0125/3949] Bump collabora/code in /Containers/collabora Bumps collabora/code from 22.05.7.2.1 to 22.05.7.3.1. --- updated-dependencies: - dependency-name: collabora/code dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/collabora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 1487172b..b1c20bd5 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -1,5 +1,5 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker -FROM collabora/code:22.05.7.2.1 +FROM collabora/code:22.05.7.3.1 USER root From df808c10bb9ae7e2e1f90aa8de7d2847d9d1b188 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 3 Nov 2022 12:52:31 +0000 Subject: [PATCH 0126/3949] nextcloud-update automated change Signed-off-by: GitHub --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 3288448d..5bd0a4b1 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -107,7 +107,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 24.0.6 +ENV NEXTCLOUD_VERSION 24.0.7 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ From 4e67b82d463a4b4eaf0e3592efe680db453a7e0d Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 3 Nov 2022 15:08:07 +0100 Subject: [PATCH 0127/3949] fix typo Signed-off-by: szaimen --- Containers/nextcloud/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 8dcdb148..851096ab 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -24,7 +24,7 @@ fi # Trust additional Cacerts, if the user provided $TRUSTED_CACERTS_DIR if [ -n "$TRUSTED_CACERTS_DIR" ]; then - echo "User required to trust additional CA certificates, running 'update-ca-certificates." + echo "User required to trust additional CA certificates, running 'update-ca-certificates.'" update-ca-certificates fi From 8cf7d47f26397d2663b2c71920bed8de8adca1ef Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 3 Nov 2022 15:09:15 +0100 Subject: [PATCH 0128/3949] increase to 2.1.2 Signed-off-by: szaimen --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index b7171ed0..659ec8c2 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.1.1

+

Nextcloud AIO v2.1.2

{# Add 2nd tab warning #} From 99b45997a6ba41bde11d87ac04d7f7e026cb6816 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 4 Nov 2022 13:53:58 +0100 Subject: [PATCH 0129/3949] Add link to docker dns Signed-off-by: Simon L. --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index b2e8c82c..742e0fec 100644 --- a/readme.md +++ b/readme.md @@ -137,6 +137,7 @@ No and it will not be added. Please use a dedicated domain for Nextcloud and set The recommended way is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. Below are some guides: - https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/ - https://howchoo.com/pi/pi-hole-setup together with https://docs.callitkarma.me/posts/PiHole-Local-DNS/ +- https://dockerlabs.collabnix.com/intermediate/networking/Configuring_DNS.html ### How to skip the domain validation? If you are completely sure that you've configured everything correctly and are not able to pass the domain validation, you may skip the domain validation by adding `-e SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer. From 90991c6c24e1703b796b89f3f130d1d832a6a0ff Mon Sep 17 00:00:00 2001 From: Brouware <63195347+Brouware@users.noreply.github.com> Date: Sat, 5 Nov 2022 00:10:13 +0100 Subject: [PATCH 0130/3949] Fixed typo's - Fixed command to check Borg version - Fixed script breaking typo under "Sync the backup regularly to another drive" Signed-off-by: Brouware <63195347+Brouware@users.noreply.github.com> --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 742e0fec..7f965bc6 100644 --- a/readme.md +++ b/readme.md @@ -275,7 +275,7 @@ sudo borg list "/mnt/backup/borg" sudo borg delete --stats --progress "/mnt/backup/borg::20220223_174237-nextcloud-aio" # If borg 1.2.0 or higher is installed, you then need to run borg compact in order to clean up the freed space -sudo borg version +sudo borg --version # If version number of the command above is higher than 1.2.0 you need to run the command below: sudo borg compact "/mnt/backup/" @@ -326,7 +326,7 @@ if ! [ -d "$DRIVE_MOUNTPOINT" ]; then exit 1 fi -if ! grep -q " $DRIVE_MOUNTPOINT " /etc/fstab; then +if ! grep -q "$DRIVE_MOUNTPOINT" /etc/fstab; then echo "Could not find the drive mountpoint in the fstab file. Did you add it there?" exit 1 fi From fd88b6188253a89b8b0e90e2ce438530a4c764c3 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 5 Nov 2022 01:40:05 +0100 Subject: [PATCH 0131/3949] do not delete the updater so that it can get used later on Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 1 - Containers/nextcloud/entrypoint.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 5bd0a4b1..4b165fd7 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -126,7 +126,6 @@ RUN set -ex; \ tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ gpgconf --kill all; \ rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ mkdir -p /usr/src/nextcloud/data; \ mkdir -p /usr/src/nextcloud/custom_apps; \ chmod +x /usr/src/nextcloud/occ; \ diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 3f7af70e..273301cc 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -99,7 +99,6 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then tar -xjf nextcloud.tar.bz2 -C /usr/src/tmp/ gpgconf --kill all rm nextcloud.tar.bz2.asc nextcloud.tar.bz2 - rm -rf "$GNUPGHOME" /usr/src/tmp/nextcloud/updater mkdir -p /usr/src/tmp/nextcloud/data mkdir -p /usr/src/tmp/nextcloud/custom_apps chmod +x /usr/src/tmp/nextcloud/occ From 0e36ae0ba9cee3ee900be7cbf59271a487708f84 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 5 Nov 2022 21:42:30 +0100 Subject: [PATCH 0132/3949] add php-deprecation-detector Signed-off-by: Simon L --- .../workflows/php-deprecation-detector.yml | 29 +++++++++++++++++++ php/composer.json | 3 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/php-deprecation-detector.yml diff --git a/.github/workflows/php-deprecation-detector.yml b/.github/workflows/php-deprecation-detector.yml new file mode 100644 index 00000000..bd25a68e --- /dev/null +++ b/.github/workflows/php-deprecation-detector.yml @@ -0,0 +1,29 @@ +name: PHP Deprecation Detector +# See https://github.com/wapmorgan/PhpDeprecationDetector + +on: + pull_request: + push: + branches: + - main + +jobs: + psalm: + name: PHP Deprecation Detector + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up php8.0 + uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + extensions: apcu + coverage: none + + - name: Run script + run: | + set -x + cd php + composer global require wapmorgan/php-deprecation-detector dev-master + composer install + composer run php-deprecation-detector \ No newline at end of file diff --git a/php/composer.json b/php/composer.json index 55fecbc6..5a0d46ed 100644 --- a/php/composer.json +++ b/php/composer.json @@ -21,6 +21,7 @@ "scripts": { "psalm": "psalm --threads=1", "psalm:update-baseline": "psalm --threads=1 --update-baseline", - "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l" + "lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l {} \\;", + "php-deprecation-detector": "find . -name \\*.php -not -path './vendor/*' -exec phpdd scan {} -n -t 8.0 \\;" } } From 19369c7ce2d795e9b2fd9f90e4dcede3ce18db74 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Mon, 7 Nov 2022 04:46:43 +0000 Subject: [PATCH 0133/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index afa54e7b..96bfc692 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From b47e674aa7422bf33f27d7d6ec186f06db4457f3 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 7 Nov 2022 19:44:02 +0100 Subject: [PATCH 0134/3949] session should not get cleared automatically before 24h Signed-off-by: Simon L --- php/public/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/php/public/index.php b/php/public/index.php index 3829017a..d469264b 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -22,6 +22,9 @@ ini_set('session.save_path', $dataConst->GetSessionDirectory()); // Auto logout on browser close ini_set('session.cookie_lifetime', '0'); +# Keep session for 24h max +ini_set('session.gc_maxlifetime', '86400'); + // Create app AppFactory::setContainer($container); $app = AppFactory::create(); From 43eddabeaf6f5dd511d88c5607f94fb6c12b8e9b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:07:10 +0000 Subject: [PATCH 0135/3949] Bump containrrr/watchtower from 1.4.0 to 1.5.1 in /Containers/watchtower Bumps containrrr/watchtower from 1.4.0 to 1.5.1. --- updated-dependencies: - dependency-name: containrrr/watchtower dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Containers/watchtower/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/watchtower/Dockerfile b/Containers/watchtower/Dockerfile index 7a54bbf2..493af190 100644 --- a/Containers/watchtower/Dockerfile +++ b/Containers/watchtower/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/containrrr/watchtower/blob/main/dockerfiles/Dockerfile.self-contained -FROM containrrr/watchtower:1.4.0 as watchtower +FROM containrrr/watchtower:1.5.1 as watchtower FROM alpine:3.16.2 From 4e7fa6b4b9e6ac302fb7db3eba9ad29a08483e8a Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 8 Nov 2022 19:29:49 +0100 Subject: [PATCH 0136/3949] Add explanation of the initial docker run command to the readme Signed-off-by: Simon L --- readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/readme.md b/readme.md index 742e0fec..74a6b60a 100644 --- a/readme.md +++ b/readme.md @@ -52,6 +52,21 @@ The following instructions are especially meant for Linux. For macOS see [this]( +
+ Explanation of the command + + - `sudo docker run` This command spins up a new docker container. + - `--name nextcloud-aio-mastercontainer` This is the name of the container and cannot be changed since mastercontainer updates would fail. + - `--restart always` This is the "restart policy". `Always` means that the container should get started always. See the docker documentation on further policies. + - `--publish 80:80` This means that port 80 of the container should get published on the host using port 80. It is used for getting valid certificates for the AIO interface if you want to use port 8443. It is not needed if you run AIO behind a reverse proxy and can get removed in that case as you can simply use port 8080 for the AIO interface then. + - `--publish 8080:8080` This means that port 8080 of the container should get published on the host using port 8080. This port is used for the AIO interface and uses a self-signed certificate by default. You can also use a different port like e.g. `--publish 8081:8080` if port 8080 should already be in use on your host. + - `--publish 8443:8443` This means that port 8443 of the container should get published on the host using port 8443. If you publish port 80 and 8443 to the public internet, you can access the AIO interface via this port with a valid certificate. It is not needed if you run AIO behind a reverse proxy and can get removed in that case as you can simply use port 8080 for the AIO interface then. + - `--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config` This means that the files that are created by the mastercontainer will be stored in a docker volume that is called `nextcloud_aio_mastercontainer`. This line is not allowed to be changed since built-in backups would fail later on. + - `--volume /var/run/docker.sock:/var/run/docker.sock:ro` The docker socket is mounted into the container which is used for spinning up all the other containers and for further features. It needs to be adjusted on Windows/macOS and on docker rootles. See the applicable documentation on this. If you dislike this, see https://github.com/nextcloud/all-in-one/discussions/500#discussioncomment-2740767 and the whole thread for options. + - `nextcloud/all-in-one:latest` or `nextcloud/all-in-one:latest-arm64` This is the docker container image that is used. See https://github.com/nextcloud/all-in-one/discussions/490 for why there are different images for the different CPU architectures. + - For further options like changing the location of Nextcloud's datadir or mounting some locatioins as external storage into the Nextcloud container, simply read through the readme and/or look at the docker-compose file: https://github.com/nextcloud/all-in-one/blob/main/docker-compose.yml +
+ 3. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.
E.g. `https://ip.address.of.this.server:8080`

If your firewall/router has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
From f42fa092022fe186a81cc5482bc0ba67166247e7 Mon Sep 17 00:00:00 2001 From: roib20 <66280613+roib20@users.noreply.github.com> Date: Tue, 8 Nov 2022 21:40:13 +0200 Subject: [PATCH 0137/3949] Proofread and revise explanation of the initial docker run command Clarify explanations of initial docker run command and fix grammar, punctuation and typos (in readme.md) Signed-off-by: roib20 <66280613+roib20@users.noreply.github.com> --- readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 74a6b60a..ce32239b 100644 --- a/readme.md +++ b/readme.md @@ -55,16 +55,16 @@ The following instructions are especially meant for Linux. For macOS see [this](
Explanation of the command - - `sudo docker run` This command spins up a new docker container. - - `--name nextcloud-aio-mastercontainer` This is the name of the container and cannot be changed since mastercontainer updates would fail. - - `--restart always` This is the "restart policy". `Always` means that the container should get started always. See the docker documentation on further policies. + - `sudo docker run` This command spins up a new docker container. Docker commands can optionally be used without `sudo` if the user is added to the docker group (this is not the same as docker rootless, see FAQ below). + - `--name nextcloud-aio-mastercontainer` This is the name of the container. This line is not allowed to be changed, since mastercontainer updates would fail. + - `--restart always` This is the "restart policy". `always` means that the container should always get started with the Docker daemon. See the Docker documentation for further detail about restart policies: https://docs.docker.com/config/containers/start-containers-automatically/ - `--publish 80:80` This means that port 80 of the container should get published on the host using port 80. It is used for getting valid certificates for the AIO interface if you want to use port 8443. It is not needed if you run AIO behind a reverse proxy and can get removed in that case as you can simply use port 8080 for the AIO interface then. - - `--publish 8080:8080` This means that port 8080 of the container should get published on the host using port 8080. This port is used for the AIO interface and uses a self-signed certificate by default. You can also use a different port like e.g. `--publish 8081:8080` if port 8080 should already be in use on your host. + - `--publish 8080:8080` This means that port 8080 of the container should get published on the host using port 8080. This port is used for the AIO interface and uses a self-signed certificate by default. You can also use a different host port if port 8080 is already used on your host, for example `--publish 8081:8080` (only the first port can be changed for the host, the second port is for the container and must remain at 8080). - `--publish 8443:8443` This means that port 8443 of the container should get published on the host using port 8443. If you publish port 80 and 8443 to the public internet, you can access the AIO interface via this port with a valid certificate. It is not needed if you run AIO behind a reverse proxy and can get removed in that case as you can simply use port 8080 for the AIO interface then. - - `--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config` This means that the files that are created by the mastercontainer will be stored in a docker volume that is called `nextcloud_aio_mastercontainer`. This line is not allowed to be changed since built-in backups would fail later on. - - `--volume /var/run/docker.sock:/var/run/docker.sock:ro` The docker socket is mounted into the container which is used for spinning up all the other containers and for further features. It needs to be adjusted on Windows/macOS and on docker rootles. See the applicable documentation on this. If you dislike this, see https://github.com/nextcloud/all-in-one/discussions/500#discussioncomment-2740767 and the whole thread for options. + - `--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config` This means that the files that are created by the mastercontainer will be stored in a docker volume that is called `nextcloud_aio_mastercontainer`. This line is not allowed to be changed, since built-in backups would fail later on. + - `--volume /var/run/docker.sock:/var/run/docker.sock:ro` The docker socket is mounted into the container which is used for spinning up all the other containers and for further features. It needs to be adjusted on Windows/macOS and on docker rootless. See the applicable documentation on this. If you dislike this, see https://github.com/nextcloud/all-in-one/discussions/500#discussioncomment-2740767 and the whole thread for options. - `nextcloud/all-in-one:latest` or `nextcloud/all-in-one:latest-arm64` This is the docker container image that is used. See https://github.com/nextcloud/all-in-one/discussions/490 for why there are different images for the different CPU architectures. - - For further options like changing the location of Nextcloud's datadir or mounting some locatioins as external storage into the Nextcloud container, simply read through the readme and/or look at the docker-compose file: https://github.com/nextcloud/all-in-one/blob/main/docker-compose.yml + - Further options can be set using environment variables, for example `--env TALK_PORT=3478`. To see explanations and examples for further variables (like changing the location of Nextcloud's datadir or mounting some locations as external storage into the Nextcloud container), read through this readme and look at the docker-compose file: https://github.com/nextcloud/all-in-one/blob/main/docker-compose.yml
3. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.
From 029b6ea7972b4f75dbdccbca5bbc83795db2599a Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 26 Sep 2022 20:27:35 +0200 Subject: [PATCH 0138/3949] allow to adjust Nextcloud apps that get installed upon first startup Signed-off-by: szaimen --- Containers/mastercontainer/start.sh | 10 +++++++++- Containers/nextcloud/entrypoint.sh | 12 ++++++------ docker-compose.yml | 1 + manual-install/update-yaml.sh | 1 + php/containers.json | 3 ++- php/src/Data/ConfigurationManager.php | 8 ++++++++ php/src/Docker/DockerActionManager.php | 2 ++ readme.md | 3 +++ tests/QA/060-environmental-variables.md | 1 + 9 files changed, 33 insertions(+), 8 deletions(-) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index c57b4207..6542d788 100755 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -165,7 +165,15 @@ if [ -n "$TRUSTED_CACERTS_DIR" ]; then if ! echo "$TRUSTED_CACERTS_DIR" | grep -q "^/" || echo "$TRUSTED_CACERTS_DIR" | grep -q "/$"; then echo "You've set TRUSTED_CACERTS_DIR but not to an allowed value. It should be an absolute path to a directory that starts with '/' but not end with '/'. -It is set to '$TRUSTED_CACERTS_DIR '." +It is set to '$TRUSTED_CACERTS_DIR'." + exit 1 + fi +fi +if [ -n "$NEXTCLOUD_STARTUP_APPS" ]; then + if ! echo "$NEXTCLOUD_STARTUP_APPS" | grep -q "^[a-z _-]\+$"; then + echo "You've set NEXTCLOUD_STARTUP_APPS but not to an allowed value. +It needs to be a string. Allowed are small letters a-z, spaces, hyphens and '_'. +It is set to '$NEXTCLOUD_STARTUP_APPS'." exit 1 fi fi diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 3f7af70e..c0f365c0 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -229,12 +229,12 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then # php /var/www/html/occ config:app:set updatenotification notify_groups --value="[]" # Install some apps by default - php /var/www/html/occ app:install twofactor_totp - php /var/www/html/occ app:install deck - php /var/www/html/occ app:install tasks - php /var/www/html/occ app:install calendar - php /var/www/html/occ app:install contacts - php /var/www/html/occ app:install apporder + if [ -n "$STARTUP_APPS" ]; then + read -ra STARTUP_APPS_ARRAY <<< "$STARTUP_APPS" + for app in "${STARTUP_APPS_ARRAY[@]}"; do + php /var/www/html/occ app:install "$app" + done + fi #upgrade else diff --git a/docker-compose.yml b/docker-compose.yml index f047f341..7808a1b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,7 @@ services: # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature + # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index d8945f7b..5706114f 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -75,6 +75,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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf cat sample.conf diff --git a/php/containers.json b/php/containers.json index 50fe1d1e..a3ceef47 100644 --- a/php/containers.json +++ b/php/containers.json @@ -156,7 +156,8 @@ "FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%", "FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch", "PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%", - "TRUSTED_CACERTS_DIR=%TRUSTED_CACERTS_DIR%" + "TRUSTED_CACERTS_DIR=%TRUSTED_CACERTS_DIR%", + "STARTUP_APPS=%NEXTCLOUD_STARTUP_APPS%" ], "maxShutdownTime": 10, "restartPolicy": "unless-stopped" diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index b1f3b560..45233349 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -700,6 +700,14 @@ class ConfigurationManager return false; } + public function GetNextcloudStartupApps() : string { + $apps = getenv('NEXTCLOUD_STARTUP_APPS'); + if (is_string($apps)) { + return trim($apps); + } + return 'twofactor_totp deck tasks calendar contacts apporder'; + } + public function GetCollaboraDictionaries() : string { $config = $this->GetConfig(); if(!isset($config['collabora_dictionaries'])) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 19fa4789..59f7602d 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -328,6 +328,8 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetApacheMaxSize(); } elseif ($out[1] === 'COLLABORA_SECCOMP_POLICY') { $replacements[1] = $this->configurationManager->GetCollaboraSeccompPolicy(); + } elseif ($out[1] === '%NEXTCLOUD_STARTUP_APPS%') { + $replacements[1] = $this->configurationManager->GetNextcloudStartupApps(); } else { $replacements[1] = $this->configurationManager->GetSecret($out[1]); } diff --git a/readme.md b/readme.md index 742e0fec..f3167415 100644 --- a/readme.md +++ b/readme.md @@ -446,6 +446,9 @@ If you get an error during the domain validation which states that your ip-addre ### How to run this with docker rootless? You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md) +### How to change the Nextcloud apps that are installed on the first startup? +You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. + ### Huge docker logs When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/ diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index 323c236e..d3b7ebf4 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -14,5 +14,6 @@ - [ ] When starting the mastercontainer with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `twofactor_totp deck tasks calendar contacts apporder`. You can now continue with [070-timezone-change.md](./070-timezone-change.md) From 78959b26cba96dbb52ccdea92b5ec5bd64ca20d9 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 8 Nov 2022 23:40:34 +0100 Subject: [PATCH 0139/3949] improve the UX when the login is blocked Signed-off-by: Simon L --- php/templates/login.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/templates/login.twig b/php/templates/login.twig index 38229a7c..b9479253 100644 --- a/php/templates/login.twig +++ b/php/templates/login.twig @@ -14,8 +14,8 @@ {% else %} -

The login is blocked since Nextcloud is running. Please use the automatic login from your Nextcloud.

- You can unblock the login by running 'sudo docker stop nextcloud-aio-apache'.

+

The login is blocked since Nextcloud is running.
Please use the automatic login from your Nextcloud.

+ If that is not possible, you can unblock the login by running
sudo docker stop nextcloud-aio-apache

{% endif %}
From f9f29ae42ad82bd2b2bff9917173ccc96f49acd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Nov 2022 12:04:23 +0000 Subject: [PATCH 0140/3949] Bump collabora/code in /Containers/collabora Bumps collabora/code from 22.05.7.3.1 to 22.05.8.2.1. --- updated-dependencies: - dependency-name: collabora/code dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/collabora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index b1c20bd5..6115a0a6 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -1,5 +1,5 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker -FROM collabora/code:22.05.7.3.1 +FROM collabora/code:22.05.8.2.1 USER root From 54687a23756a8e470270ee9b8b8934c6d3cb0a65 Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 9 Nov 2022 12:24:54 +0000 Subject: [PATCH 0141/3949] dependency updates Signed-off-by: GitHub --- php/composer.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index 5bf60037..8d2f12f0 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -1137,30 +1137,30 @@ }, { "name": "slim/csrf", - "version": "1.2.1", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim-Csrf.git", - "reference": "ee811a258ecee807846aefc51aabc1963ae0a400" + "reference": "ebaaf295fd6d7224078d8ae3bba45329b31798c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Csrf/zipball/ee811a258ecee807846aefc51aabc1963ae0a400", - "reference": "ee811a258ecee807846aefc51aabc1963ae0a400", + "url": "https://api.github.com/repos/slimphp/Slim-Csrf/zipball/ebaaf295fd6d7224078d8ae3bba45329b31798c7", + "reference": "ebaaf295fd6d7224078d8ae3bba45329b31798c7", "shasum": "" }, "require": { - "php": "^7.3|^8.0", + "php": "^7.4 || ^8.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0" }, "require-dev": { - "phpspec/prophecy": "^1.12", + "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.5.8" + "squizlabs/php_codesniffer": "^3.7" }, "type": "library", "autoload": { @@ -1180,7 +1180,7 @@ } ], "description": "Slim Framework 4 CSRF protection PSR-15 middleware", - "homepage": "http://slimframework.com", + "homepage": "https://www.slimframework.com", "keywords": [ "csrf", "framework", @@ -1189,22 +1189,22 @@ ], "support": { "issues": "https://github.com/slimphp/Slim-Csrf/issues", - "source": "https://github.com/slimphp/Slim-Csrf/tree/1.2.1" + "source": "https://github.com/slimphp/Slim-Csrf/tree/1.3.0" }, - "time": "2021-02-04T15:37:21+00:00" + "time": "2022-11-05T19:27:53+00:00" }, { "name": "slim/slim", - "version": "4.10.0", + "version": "4.11.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0" + "reference": "b0f4ca393ea037be9ac7292ba7d0a34d18bac0c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0", - "reference": "0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/b0f4ca393ea037be9ac7292ba7d0a34d18bac0c7", + "reference": "b0f4ca393ea037be9ac7292ba7d0a34d18bac0c7", "shasum": "" }, "require": { @@ -1219,21 +1219,21 @@ "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { - "adriansuter/php-autoload-override": "^1.2", + "adriansuter/php-autoload-override": "^1.3", "ext-simplexml": "*", - "guzzlehttp/psr7": "^2.1", + "guzzlehttp/psr7": "^2.4", "httpsoft/http-message": "^1.0", "httpsoft/http-server-request": "^1.0", - "laminas/laminas-diactoros": "^2.8", + "laminas/laminas-diactoros": "^2.17", "nyholm/psr7": "^1.5", "nyholm/psr7-server": "^1.0", "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^1.8", "phpunit/phpunit": "^9.5", "slim/http": "^1.2", "slim/psr7": "^1.5", - "squizlabs/php_codesniffer": "^3.6" + "squizlabs/php_codesniffer": "^3.7" }, "suggest": { "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", @@ -1306,7 +1306,7 @@ "type": "tidelift" } ], - "time": "2022-03-14T14:18:23+00:00" + "time": "2022-11-06T16:33:39+00:00" }, { "name": "slim/twig-view", From bdb159b2fe670a87e8ac84dccbd514bffe629129 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 11:42:43 +0100 Subject: [PATCH 0142/3949] add a link Signed-off-by: Simon L --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7808a1b2..3480eb92 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature - # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time + # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-nextcloud-apps-that-are-installed-on-the-first-startup # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 From 9b8937884e228796ad7de0e0f47c05ecd04841ef Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 11:44:51 +0100 Subject: [PATCH 0143/3949] fix the link Signed-off-by: Simon L --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3480eb92..57e3339b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature - # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-nextcloud-apps-that-are-installed-on-the-first-startup + # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 From d424776a43fb683b14efae2fce025a70251f3f17 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 9 Nov 2022 20:28:50 +0100 Subject: [PATCH 0144/3949] rename TRUSTED_CACERTS_DIR to NEXTCLOUD_TRUSTED_CACERTS_DIR Signed-off-by: Simon L --- Containers/mastercontainer/start.sh | 8 ++++---- docker-compose.yml | 2 +- manual-install/update-yaml.sh | 2 +- php/containers.json | 4 ++-- php/src/ContainerDefinitionFetcher.php | 2 +- php/src/Data/ConfigurationManager.php | 2 +- php/src/Docker/DockerActionManager.php | 2 +- readme.md | 4 ++-- tests/QA/060-environmental-variables.md | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) mode change 100755 => 100644 Containers/mastercontainer/start.sh diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh old mode 100755 new mode 100644 index 6542d788..d440f5d9 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -161,11 +161,11 @@ It is set to '$DOCKER_SOCKET_PATH'." exit 1 fi fi -if [ -n "$TRUSTED_CACERTS_DIR" ]; then - if ! echo "$TRUSTED_CACERTS_DIR" | grep -q "^/" || echo "$TRUSTED_CACERTS_DIR" | grep -q "/$"; then - echo "You've set TRUSTED_CACERTS_DIR but not to an allowed value. +if [ -n "$NEXTCLOUD_TRUSTED_CACERTS_DIR" ]; then + if ! echo "$NEXTCLOUD_TRUSTED_CACERTS_DIR" | grep -q "^/" || echo "$NEXTCLOUD_TRUSTED_CACERTS_DIR" | grep -q "/$"; then + echo "You've set NEXTCLOUD_TRUSTED_CACERTS_DIR but not to an allowed value. It should be an absolute path to a directory that starts with '/' but not end with '/'. -It is set to '$TRUSTED_CACERTS_DIR'." +It is set to '$NEXTCLOUD_TRUSTED_CACERTS_DIR '." exit 1 fi fi diff --git a/docker-compose.yml b/docker-compose.yml index 57e3339b..916620d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: # - DISABLE_BACKUP_SECTION=true # Setting this to true allows to hide the backup section in the AIO interface. # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud - # - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca + # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 5706114f..7538e062 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -65,7 +65,7 @@ sed -i 's|NEXTCLOUD_MOUNT=|NEXTCLOUD_MOUNT=/mnt/ # This allows the Next sed -i 's|NEXTCLOUD_UPLOAD_LIMIT=|NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container|' sample.conf sed -i 's|APACHE_MAX_SIZE=|APACHE_MAX_SIZE=10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT|' sample.conf sed -i 's|NEXTCLOUD_MAX_TIME=|NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container|' sample.conf -sed -i 's|TRUSTED_CACERTS_DIR=|TRUSTED_CACERTS_DIR=/path/to/my/cacerts # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.|' sample.conf +sed -i 's|NEXTCLOUD_TRUSTED_CACERTS_DIR=|NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.|' sample.conf sed -i 's|UPDATE_NEXTCLOUD_APPS=|UPDATE_NEXTCLOUD_APPS=no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays.|' sample.conf sed -i 's|APACHE_PORT=|APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy.|' sample.conf sed -i 's|TALK_PORT=|TALK_PORT=3478 # This allows to adjust the port that the talk container is using.|' sample.conf diff --git a/php/containers.json b/php/containers.json index a3ceef47..2f83611f 100644 --- a/php/containers.json +++ b/php/containers.json @@ -116,7 +116,7 @@ "writeable": true }, { - "name": "%TRUSTED_CACERTS_DIR%", + "name": "%NEXTCLOUD_TRUSTED_CACERTS_DIR%", "location": "/usr/local/share/ca-certificates", "writeable": false } @@ -156,7 +156,7 @@ "FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%", "FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch", "PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%", - "TRUSTED_CACERTS_DIR=%TRUSTED_CACERTS_DIR%", + "TRUSTED_CACERTS_DIR=%NEXTCLOUD_TRUSTED_CACERTS_DIR%", "STARTUP_APPS=%NEXTCLOUD_STARTUP_APPS%" ], "maxShutdownTime": 10, diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index e6d416ef..f2d30804 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -120,7 +120,7 @@ class ContainerDefinitionFetcher if($value['name'] === '') { continue; } - } elseif ($value['name'] === '%TRUSTED_CACERTS_DIR%') { + } elseif ($value['name'] === '%NEXTCLOUD_TRUSTED_CACERTS_DIR%') { $value['name'] = $this->configurationManager->GetTrustedCacertsDir(); if($value['name'] === '') { continue; diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 45233349..06fc2ce4 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -548,7 +548,7 @@ class ConfigurationManager } public function GetTrustedCacertsDir() : string { - $envVariableName = 'TRUSTED_CACERTS_DIR'; + $envVariableName = 'NEXTCLOUD_TRUSTED_CACERTS_DIR'; $configName = 'trusted_cacerts_dir'; $defaultValue = ''; return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 59f7602d..ad46dc09 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -314,7 +314,7 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetNextcloudUploadLimit(); } elseif ($out[1] === 'NEXTCLOUD_MAX_TIME') { $replacements[1] = $this->configurationManager->GetNextcloudMaxTime(); - } elseif ($out[1] === 'TRUSTED_CACERTS_DIR') { + } elseif ($out[1] === 'NEXTCLOUD_TRUSTED_CACERTS_DIR') { $replacements[1] = $this->configurationManager->GetTrustedCacertsDir(); } elseif ($out[1] === 'ADDITIONAL_DIRECTORIES_BACKUP') { if ($this->configurationManager->GetAdditionalBackupDirectoriesString() !== '') { diff --git a/readme.md b/readme.md index e24f8860..9245b2ec 100644 --- a/readme.md +++ b/readme.md @@ -516,9 +516,9 @@ What are the requirements? ### How to trust user-defiend Certification Authorities (CA)? For some applications it might be necessary to enstablish a secured connection to a host / server which is using a certificated issued by a Certification Authority that is not trusted out of the box. An example could be configuring LDAPS against the Domain Controller (ActiveDirectory) of an organization -You can make the Nextcloud container trust any Certification Authority by providing the environmental variable `TRUSTED_CACERTS_DIR` when starting the AIO-mastercontainer. The value of the variables should be set to the absolute path to a directory on the host, which contains one or more Certification Authority's certificate. You should use X.509 certificates, Base64 encoded. (Other formats may work but have not been tested!) All the certificates in the directory will be trusted. +You can make the Nextcloud container trust any Certification Authority by providing the environmental variable `NEXTCLOUD_TRUSTED_CACERTS_DIR` when starting the AIO-mastercontainer. The value of the variables should be set to the absolute path to a directory on the host, which contains one or more Certification Authority's certificate. You should use X.509 certificates, Base64 encoded. (Other formats may work but have not been tested!) All the certificates in the directory will be trusted. -When using `docker run`, the environmental variable can be set with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`. +When using `docker run`, the environmental variable can be set with `-e NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`. In order for the value to be valid, the path should start with `/` and not end with '/' and point to an existing **directory**. Pointing the variable directly to a certificate **file** will not work and may also break things. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index d3b7ebf4..eeb51178 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -11,7 +11,7 @@ - [ ] When starting the mastercontainer with `-e NEXTCLOUD_MAX_TIME=4000` it should change Nextclouds upload max time 4000s. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud for allowed values. - [ ] When starting the mastercontainer with `-e DOCKER_SOCKET_PATH="/var/run/docker.sock.raw"` it should map `/var/run/docker.sock.raw` to `/var/run/docker.sock` inside the watchtower container which allow to update the mastercontainer on macos and with docker rootless. - [ ] When starting the mastercontainer with `-e DISABLE_BACKUP_SECTION=true` it should hide the backup section that gets shown after AIO is set up (everything of [020-backup-and-restore](./020-backup-and-restore.md)) and simply show that the backup section is disabled. -- [ ] When starting the mastercontainer with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `twofactor_totp deck tasks calendar contacts apporder`. From 6a51a6a251d967afe5debf377239bc7f03219a80 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 11:53:40 +0100 Subject: [PATCH 0145/3949] use an existing path as example Signed-off-by: Simon L --- manual-install/update-yaml.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 7538e062..f25f4cbe 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -65,7 +65,7 @@ sed -i 's|NEXTCLOUD_MOUNT=|NEXTCLOUD_MOUNT=/mnt/ # This allows the Next sed -i 's|NEXTCLOUD_UPLOAD_LIMIT=|NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container|' sample.conf sed -i 's|APACHE_MAX_SIZE=|APACHE_MAX_SIZE=10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT|' sample.conf sed -i 's|NEXTCLOUD_MAX_TIME=|NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container|' sample.conf -sed -i 's|NEXTCLOUD_TRUSTED_CACERTS_DIR=|NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.|' sample.conf +sed -i 's|NEXTCLOUD_TRUSTED_CACERTS_DIR=|NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.|' sample.conf sed -i 's|UPDATE_NEXTCLOUD_APPS=|UPDATE_NEXTCLOUD_APPS=no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays.|' sample.conf sed -i 's|APACHE_PORT=|APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy.|' sample.conf sed -i 's|TALK_PORT=|TALK_PORT=3478 # This allows to adjust the port that the talk container is using.|' sample.conf From 588f9a36e7ba3d8afe2a2b5a6c27d531ddd7bf0b Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 9 Nov 2022 21:25:10 +0100 Subject: [PATCH 0146/3949] allow to adjust the PHP memory limit Signed-off-by: Simon L --- Containers/mastercontainer/start.sh | 8 ++++++++ docker-compose.yml | 1 + manual-install/update-yaml.sh | 1 + php/containers.json | 1 + php/src/Data/ConfigurationManager.php | 7 +++++++ php/src/Docker/DockerActionManager.php | 2 ++ readme.md | 3 +++ tests/QA/060-environmental-variables.md | 1 + 8 files changed, 24 insertions(+) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index d440f5d9..b4333123 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -120,6 +120,14 @@ It is set to '$NEXTCLOUD_MAX_TIME'." exit 1 fi fi +if [ -n "$NEXTCLOUD_MEMORY_LIMIT" ]; then + if ! echo "$NEXTCLOUD_MEMORY_LIMIT" | grep -q '^[0-9]\+M$'; then + echo "You've set NEXTCLOUD_MEMORY_LIMIT but not to an allowed value. +The string must start with a number and end with 'M'. +It is set to '$NEXTCLOUD_MEMORY_LIMIT'." + exit 1 + fi +fi if [ -n "$APACHE_PORT" ]; then if ! check_if_number "$APACHE_PORT"; then echo "You provided an Apache port but did not only use numbers. diff --git a/docker-compose.yml b/docker-compose.yml index 916620d3..495dccee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,7 @@ services: # - DISABLE_BACKUP_SECTION=true # Setting this to true allows to hide the backup section in the AIO interface. # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud + # - NEXTCLOUD_MEMORY_LIMIT=512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index f25f4cbe..70c3a2e5 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -63,6 +63,7 @@ sed -i 's|COLLABORA_DICTIONARIES=|COLLABORA_DICTIONARIES=de_DE en_GB en_US es_ES sed -i 's|NEXTCLOUD_DATADIR=|NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data # You can change this to e.g. "/mnt/ncdata" to map it to a location on your host. It needs to be adjusted before the first startup and never afterwards!|' sample.conf sed -i 's|NEXTCLOUD_MOUNT=|NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR!|' sample.conf sed -i 's|NEXTCLOUD_UPLOAD_LIMIT=|NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container|' sample.conf +sed -i 's|NEXTCLOUD_MEMORY_LIMIT=|NEXTCLOUD_MEMORY_LIMIT=512M # This allows to change the PHP memory limit of the Nextcloud container|' sample.conf sed -i 's|APACHE_MAX_SIZE=|APACHE_MAX_SIZE=10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT|' sample.conf sed -i 's|NEXTCLOUD_MAX_TIME=|NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container|' sample.conf sed -i 's|NEXTCLOUD_TRUSTED_CACERTS_DIR=|NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.|' sample.conf diff --git a/php/containers.json b/php/containers.json index 2f83611f..a7437487 100644 --- a/php/containers.json +++ b/php/containers.json @@ -153,6 +153,7 @@ "IMAGINARY_ENABLED=%IMAGINARY_ENABLED%", "IMAGINARY_HOST=nextcloud-aio-imaginary", "PHP_UPLOAD_LIMIT=%NEXTCLOUD_UPLOAD_LIMIT%", + "PHP_MEMORY_LIMIT=%NEXTCLOUD_MEMORY_LIMIT%", "FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%", "FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch", "PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%", diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 06fc2ce4..cc8babb1 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -528,6 +528,13 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } + public function GetNextcloudMemoryLimit() : string { + $envVariableName = 'NEXTCLOUD_MEMORY_LIMIT'; + $configName = 'nextcloud_memory_limit'; + $defaultValue = '512M'; + return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + } + public function GetApacheMaxSize() : int { $uploadLimit = (int)rtrim($this->GetNextcloudUploadLimit(), 'G'); return $uploadLimit * 1024 * 1024 * 1024; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index ad46dc09..3debf73e 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -312,6 +312,8 @@ class DockerActionManager } } elseif ($out[1] === 'NEXTCLOUD_UPLOAD_LIMIT') { $replacements[1] = $this->configurationManager->GetNextcloudUploadLimit(); + } elseif ($out[1] === 'NEXTCLOUD_MEMORY_LIMIT') { + $replacements[1] = $this->configurationManager->GetNextcloudMemoryLimit(); } elseif ($out[1] === 'NEXTCLOUD_MAX_TIME') { $replacements[1] = $this->configurationManager->GetNextcloudMaxTime(); } elseif ($out[1] === 'NEXTCLOUD_TRUSTED_CACERTS_DIR') { diff --git a/readme.md b/readme.md index 9245b2ec..ff6d9b33 100644 --- a/readme.md +++ b/readme.md @@ -455,6 +455,9 @@ By default are uploads to Nextcloud limited to a max of 10G. You can adjust the ### How to adjust the max execution time for Nextcloud? By default are uploads to Nextcloud limited to a max of 3600s. You can adjust the upload time limit by providing `-e NEXTCLOUD_MAX_TIME=3600` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a number e.g. `3600`. +### How to adjust the PHP memory limit for Nextcloud? +By default is each PHP process in the Nextcloud container limited to a max of 512 MB. You can adjust the memory limit by providing `-e NEXTCLOUD_MEMORY_LIMIT=512M` to the docker run command of the mastercontainer and customize the value to your fitting. It must start with a number and end with `M` e.g. `1024M`. + ### What can I do to fix the internal or reserved ip-address error? If you get an error during the domain validation which states that your ip-address is an internal or reserved ip-address, you can fix this by first making sure that your domain indeed has the correct public ip-address that points to the server and then adding `--add-host yourdomain.com:` to the initial docker run command which will allow the domain validation to work correctly. And so that you know: even if the `A` record of your domain should change over time, this is no problem since the mastercontainer will not make any attempt to access the chosen domain after the initial domain validation. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index eeb51178..6adb70e7 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -8,6 +8,7 @@ - [ ] When starting the mastercontainer with `-e NEXTCLOUD_DATADIR="/mnt/testdata"` it should map that location from `/mnt/testdata` to `/mnt/ncdata` inside the Nextcloud container. Not having adjusted the permissions correctly before starting the Nextcloud container the first time will not allow the Nextcloud container to start correctly. See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir for allowed values. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_MOUNT="/mnt/"` it should map `/mnt/` to `/mnt/` inside the Nextcloud container. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host for allowed values. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_UPLOAD_LIMIT=11G` it should change Nextclouds upload limit to 11G. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud for allowed values. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_MEMORY_LIMIT=1024M` it should change Nextclouds PHP memory limit to 1024M. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud for allowed values. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_MAX_TIME=4000` it should change Nextclouds upload max time 4000s. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud for allowed values. - [ ] When starting the mastercontainer with `-e DOCKER_SOCKET_PATH="/var/run/docker.sock.raw"` it should map `/var/run/docker.sock.raw` to `/var/run/docker.sock` inside the watchtower container which allow to update the mastercontainer on macos and with docker rootless. - [ ] When starting the mastercontainer with `-e DISABLE_BACKUP_SECTION=true` it should hide the backup section that gets shown after AIO is set up (everything of [020-backup-and-restore](./020-backup-and-restore.md)) and simply show that the backup section is disabled. From da2b967a3311166b0f234374ad09d845a449e1a5 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 8 Nov 2022 21:38:31 +0100 Subject: [PATCH 0147/3949] allow to add dependencies and php extensions into the Nextcloud container Signed-off-by: Simon L --- .github/workflows/nextcloud-update.yml | 4 ++-- Containers/mastercontainer/start.sh | 16 ++++++++++++++ Containers/nextcloud/Dockerfile | 2 -- Containers/nextcloud/start.sh | 28 +++++++++++++++++++++++++ docker-compose.yml | 2 ++ manual-install/update-yaml.sh | 2 ++ php/containers.json | 4 +++- php/src/Data/ConfigurationManager.php | 14 +++++++++++++ php/src/Docker/DockerActionManager.php | 4 ++++ readme.md | 10 +++++++++ tests/QA/060-environmental-variables.md | 2 ++ 11 files changed, 83 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nextcloud-update.yml b/.github/workflows/nextcloud-update.yml index aa681496..a14a11e5 100644 --- a/.github/workflows/nextcloud-update.yml +++ b/.github/workflows/nextcloud-update.yml @@ -57,8 +57,8 @@ jobs: | sort -V \ | tail -1 )" - sed -i "s|pecl install imagick.*\;|pecl install imagick-$imagick_version\;|" ./Containers/nextcloud/Dockerfile - + sed -i "s|pecl install imagick.*|pecl install imagick-$imagick_version|" ./Containers/nextcloud/start.sh + # Nextcloud NC_MAJOR="$(grep "ENV NEXTCLOUD_VERSION" ./Containers/nextcloud/Dockerfile | grep -oP '[23][0-9]')" NCVERSION=$(curl -s -m 900 https://download.nextcloud.com/server/releases/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | grep "$NC_MAJOR" | sort --version-sort | tail -1) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index b4333123..ba00eb0f 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -185,6 +185,22 @@ It is set to '$NEXTCLOUD_STARTUP_APPS'." exit 1 fi fi +if [ -n "$NEXTCLOUD_ADDITIONAL_APKS" ]; then + if ! echo "$NEXTCLOUD_ADDITIONAL_APKS" | grep -q "^[a-z _-]\+$"; then + echo "You've set NEXTCLOUD_ADDITIONAL_APKS but not to an allowed value. +It needs to be a string. Allowed are small letters a-z, spaces, hyphens and '_'. +It is set to '$NEXTCLOUD_ADDITIONAL_APKS'." + exit 1 + fi +fi +if [ -n "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" ]; then + if ! echo "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" | grep -q "^[a-z _-]\+$"; then + echo "You've set NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS but not to an allowed value. +It needs to be a string. Allowed are small letters a-z, spaces, hyphens and '_'. +It is set to '$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS'." + exit 1 + fi +fi # Check DNS resolution # Prevents issues like https://github.com/nextcloud/all-in-one/discussions/565 diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 5bd0a4b1..a4f9e4c1 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -64,13 +64,11 @@ RUN set -ex; \ pecl install APCu-5.1.22; \ pecl install memcached-3.2.0; \ pecl install redis-5.3.7; \ - pecl install imagick-3.7.0; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ - imagick \ ; \ rm -r /tmp/pear; \ \ diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 851096ab..b6a3c749 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -36,6 +36,34 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then fi sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" +# Install additional dependencies +if [ -n "$ADDITIONAL_APKS" ]; then + if ! [ -f "/additional-apks-are-installed" ]; then + read -ra ADDITIONAL_APKS_ARRAY <<< "$ADDITIONAL_APKS" + for app in "${ADDITIONAL_APKS_ARRAY[@]}"; do + apk add "$app" + done + fi + touch /additional-apks-are-installed +fi + +# Install additional php extensions +if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then + if ! [ -f "/additional-php-extensions-are-installed" ]; then + read -ra ADDITIONAL_PHP_EXTENSIONS_ARRAY <<< "$ADDITIONAL_PHP_EXTENSIONS" + for app in "${ADDITIONAL_PHP_EXTENSIONS_ARRAY[@]}"; do + if [ "$app" = imagick ]; then + pecl install imagick-3.7.0 + docker-php-ext-enable imagick + else + pecl install "$app" + docker-php-ext-enable "$app" + fi + done + fi + touch /additional-php-extensions-are-installed +fi + # Run original entrypoint if ! sudo -E -u www-data bash /entrypoint.sh; then exit 1 diff --git a/docker-compose.yml b/docker-compose.yml index 495dccee..2bccf6a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,6 +30,8 @@ services: # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup + # - NEXTCLOUD_ADDITIONAL_APKS=imagick # This allows to add additional packages to the Nextcloud container permanently. + # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 70c3a2e5..50f60fd2 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -77,6 +77,8 @@ 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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # 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=imagick # This allows to add additional packages to the Nextcloud container permanently.|' sample.conf +sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf cat sample.conf diff --git a/php/containers.json b/php/containers.json index a7437487..9412ed63 100644 --- a/php/containers.json +++ b/php/containers.json @@ -158,7 +158,9 @@ "FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch", "PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%", "TRUSTED_CACERTS_DIR=%NEXTCLOUD_TRUSTED_CACERTS_DIR%", - "STARTUP_APPS=%NEXTCLOUD_STARTUP_APPS%" + "STARTUP_APPS=%NEXTCLOUD_STARTUP_APPS%", + "ADDITIONAL_APKS=%NEXTCLOUD_ADDITIONAL_APKS%", + "ADDITIONAL_PHP_EXTENSIONS=%NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS%" ], "maxShutdownTime": 10, "restartPolicy": "unless-stopped" diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index cc8babb1..fb0a986a 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -561,6 +561,20 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } + public function GetNextcloudAdditionalApks() : string { + $envVariableName = 'NEXTCLOUD_ADDITIONAL_APKS'; + $configName = 'nextcloud_additional_apks'; + $defaultValue = ''; + return trim($this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue)); + } + + public function GetNextcloudAdditionalPhpExtensions() : string { + $envVariableName = 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS'; + $configName = 'nextcloud_additional_php_extensions'; + $defaultValue = 'imagick'; + return trim($this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue)); + } + public function GetCollaboraSeccompPolicy() : string { $defaultString = '--o:security.seccomp='; if ($this->GetCollaboraSeccompDisabledState() !== 'true') { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 3debf73e..0377cd26 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -332,6 +332,10 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetCollaboraSeccompPolicy(); } elseif ($out[1] === '%NEXTCLOUD_STARTUP_APPS%') { $replacements[1] = $this->configurationManager->GetNextcloudStartupApps(); + } elseif ($out[1] === '%NEXTCLOUD_ADDITIONAL_APKS%') { + $replacements[1] = $this->configurationManager->GetNextcloudAdditionalApks(); + } elseif ($out[1] === '%NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS%') { + $replacements[1] = $this->configurationManager->GetNextcloudAdditionalPhpExtensions(); } else { $replacements[1] = $this->configurationManager->GetSecret($out[1]); } diff --git a/readme.md b/readme.md index ff6d9b33..2d6867e1 100644 --- a/readme.md +++ b/readme.md @@ -467,6 +467,16 @@ You can run AIO also with docker rootless. How to do this is documented here: [d ### How to change the Nextcloud apps that are installed on the first startup? You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. +### How to add packets permanently to the Nextcloud container? +Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require external dependencies. + +You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS=dependency1 dependency2` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer= + +### How to add PHP extensions permanently to the Nextcloud container? +Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional php extensions into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require additional php extensions. + +You can do so by adding `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick extension1 extension2` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default added is `imagick`. If you want to keep that, you need to specify it as well. + ### Huge docker logs When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/ diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index 6adb70e7..0b8e70a9 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -16,5 +16,7 @@ See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `twofactor_totp deck tasks calendar contacts apporder`. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=inotify`, the resulting Nextcloud container should have the inotify extension installed and not the imagick extension. You can now continue with [070-timezone-change.md](./070-timezone-change.md) From 6f4b91867733d2753bf48f629cb14be90c1de0ca Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 12:49:13 +0100 Subject: [PATCH 0148/3949] increase to 3.0.0 Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 659ec8c2..40380d20 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v2.1.2

+

Nextcloud AIO v3.0.0

{# Add 2nd tab warning #} From 50e3a5f5de7e65806784cbc44fc17e0b27890918 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 13:22:52 +0100 Subject: [PATCH 0149/3949] fix the string replacement Signed-off-by: Simon L --- php/src/Docker/DockerActionManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 3debf73e..192ef868 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -330,7 +330,7 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetApacheMaxSize(); } elseif ($out[1] === 'COLLABORA_SECCOMP_POLICY') { $replacements[1] = $this->configurationManager->GetCollaboraSeccompPolicy(); - } elseif ($out[1] === '%NEXTCLOUD_STARTUP_APPS%') { + } elseif ($out[1] === 'NEXTCLOUD_STARTUP_APPS') { $replacements[1] = $this->configurationManager->GetNextcloudStartupApps(); } else { $replacements[1] = $this->configurationManager->GetSecret($out[1]); From 0bab4eaa6dc5516b0339ca485f61f941f61c7ffc Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 10 Nov 2022 12:26:29 +0000 Subject: [PATCH 0150/3949] dependency updates Signed-off-by: GitHub --- php/composer.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index 8d2f12f0..d8ec0b70 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -1442,16 +1442,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -1466,7 +1466,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1504,7 +1504,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -1520,20 +1520,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -1548,7 +1548,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1587,7 +1587,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -1603,20 +1603,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { @@ -1625,7 +1625,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1666,7 +1666,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, "funding": [ { @@ -1682,7 +1682,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "twig/twig", From 38dd034fae9656cb22561b6e1024379b9681f594 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 13:28:00 +0100 Subject: [PATCH 0151/3949] improv the startup apps docs Signed-off-by: Simon L --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ff6d9b33..c19fee72 100644 --- a/readme.md +++ b/readme.md @@ -465,7 +465,7 @@ If you get an error during the domain validation which states that your ip-addre You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md) ### How to change the Nextcloud apps that are installed on the first startup? -You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. +You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts apporder"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. ### Huge docker logs When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/ From bc9abd39a97b74f40d0bf577ac7599cba4f1ab68 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 17:31:06 +0100 Subject: [PATCH 0152/3949] address review Signed-off-by: Simon L --- .github/workflows/nextcloud-update.yml | 2 +- Containers/nextcloud/start.sh | 13 ++++++++----- docker-compose.yml | 4 ++-- php/src/Docker/DockerActionManager.php | 4 ++-- readme.md | 4 ++-- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nextcloud-update.yml b/.github/workflows/nextcloud-update.yml index a14a11e5..bc5eff30 100644 --- a/.github/workflows/nextcloud-update.yml +++ b/.github/workflows/nextcloud-update.yml @@ -57,7 +57,7 @@ jobs: | sort -V \ | tail -1 )" - sed -i "s|pecl install imagick.*|pecl install imagick-$imagick_version|" ./Containers/nextcloud/start.sh + sed -i "s|pecl install imagick.*|pecl install imagick-$imagick_version >/dev/null|" ./Containers/nextcloud/start.sh # Nextcloud NC_MAJOR="$(grep "ENV NEXTCLOUD_VERSION" ./Containers/nextcloud/Dockerfile | grep -oP '[23][0-9]')" diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index b6a3c749..f047f32d 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -41,7 +41,8 @@ if [ -n "$ADDITIONAL_APKS" ]; then if ! [ -f "/additional-apks-are-installed" ]; then read -ra ADDITIONAL_APKS_ARRAY <<< "$ADDITIONAL_APKS" for app in "${ADDITIONAL_APKS_ARRAY[@]}"; do - apk add "$app" + echo "Installing $app via apk..." + apk add --no-cache "$app" >/dev/null done fi touch /additional-apks-are-installed @@ -53,11 +54,13 @@ if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then read -ra ADDITIONAL_PHP_EXTENSIONS_ARRAY <<< "$ADDITIONAL_PHP_EXTENSIONS" for app in "${ADDITIONAL_PHP_EXTENSIONS_ARRAY[@]}"; do if [ "$app" = imagick ]; then - pecl install imagick-3.7.0 - docker-php-ext-enable imagick + echo "Installing Imagick via PECL..." + pecl install imagick-3.7.0 >/dev/null + docker-php-ext-enable imagick >/dev/null else - pecl install "$app" - docker-php-ext-enable "$app" + echo "Installing $app via PECL..." + pecl install "$app" >/dev/null + docker-php-ext-enable "$app" >/dev/null fi done fi diff --git a/docker-compose.yml b/docker-compose.yml index 2bccf6a1..b654038f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,8 +30,8 @@ services: # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup - # - NEXTCLOUD_ADDITIONAL_APKS=imagick # This allows to add additional packages to the Nextcloud container permanently. - # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. + # - NEXTCLOUD_ADDITIONAL_APKS=imagick # This allows to add additional packages to the Nextcloud container permanently. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container + # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 0377cd26..02cf0875 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -332,9 +332,9 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetCollaboraSeccompPolicy(); } elseif ($out[1] === '%NEXTCLOUD_STARTUP_APPS%') { $replacements[1] = $this->configurationManager->GetNextcloudStartupApps(); - } elseif ($out[1] === '%NEXTCLOUD_ADDITIONAL_APKS%') { + } elseif ($out[1] === 'NEXTCLOUD_ADDITIONAL_APKS') { $replacements[1] = $this->configurationManager->GetNextcloudAdditionalApks(); - } elseif ($out[1] === '%NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS%') { + } elseif ($out[1] === 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS') { $replacements[1] = $this->configurationManager->GetNextcloudAdditionalPhpExtensions(); } else { $replacements[1] = $this->configurationManager->GetSecret($out[1]); diff --git a/readme.md b/readme.md index 2d6867e1..feec365d 100644 --- a/readme.md +++ b/readme.md @@ -470,12 +470,12 @@ You might want to adjust the Nextcloud apps that are installed upon the first st ### How to add packets permanently to the Nextcloud container? Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require external dependencies. -You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS=dependency1 dependency2` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer= +You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS="dependency1 dependency2"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer= ### How to add PHP extensions permanently to the Nextcloud container? Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional php extensions into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require additional php extensions. -You can do so by adding `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick extension1 extension2` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default added is `imagick`. If you want to keep that, you need to specify it as well. +You can do so by adding `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS="imagick extension1 extension2"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default added is `imagick`. If you want to keep that, you need to specify it as well. ### Huge docker logs When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/ From fb7d5e531fed48f3d7e7dbb89733ad9baec849b6 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 18:04:12 +0100 Subject: [PATCH 0153/3949] add error output Signed-off-by: Simon L --- Containers/nextcloud/start.sh | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index f047f32d..ab44b741 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -42,7 +42,9 @@ if [ -n "$ADDITIONAL_APKS" ]; then read -ra ADDITIONAL_APKS_ARRAY <<< "$ADDITIONAL_APKS" for app in "${ADDITIONAL_APKS_ARRAY[@]}"; do echo "Installing $app via apk..." - apk add --no-cache "$app" >/dev/null + if ! apk add --no-cache "$app" >/dev/null; then + echo "The packet $app was not installed!" + fi done fi touch /additional-apks-are-installed @@ -56,11 +58,32 @@ if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then if [ "$app" = imagick ]; then echo "Installing Imagick via PECL..." pecl install imagick-3.7.0 >/dev/null - docker-php-ext-enable imagick >/dev/null - else + if ! docker-php-ext-enable imagick >/dev/null; then + echo "Could not install PHP extension imagick!" + fi + elif [ "$app" = inotify ]; then echo "Installing $app via PECL..." pecl install "$app" >/dev/null - docker-php-ext-enable "$app" >/dev/null + if ! docker-php-ext-enable "$app" >/dev/null; then + echo "Could not install PHP extension $app!" + fi + elif [ "$app" = soap ]; then + echo "Installing $app from core..." + if ! docker-php-ext-install -j "$(nproc)" "$app" >/dev/null; then + echo "Could not install PHP extension $app!" + fi + else + echo "Installing PHP extension $app ..." + if pecl install "$app" >/dev/null; then + if ! docker-php-ext-enable "$app" >/dev/null; then + echo "Could not install PHP extension $app!" + fi + else + echo "Could not install $app using PECL. Trying to install from core..." + if ! docker-php-ext-install -j "$(nproc)" "$app" >/dev/null; then + echo "Could also not install $app from core. The PHP extensions was not installed!" + fi + fi fi done fi From 7bca6b3d2e83b2fb70c95b638570f24884fce00a Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 19:16:33 +0100 Subject: [PATCH 0154/3949] follow-up to #1377 Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 2 -- Containers/nextcloud/start.sh | 29 +++++++++++++++++++------ docker-compose.yml | 2 +- manual-install/update-yaml.sh | 2 +- php/src/Data/ConfigurationManager.php | 2 +- readme.md | 2 +- tests/QA/060-environmental-variables.md | 2 +- 7 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index a4f9e4c1..ccc7d8ca 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -39,7 +39,6 @@ RUN set -ex; \ openldap-dev \ pcre-dev \ postgresql-dev \ - imagemagick-dev \ libwebp-dev \ gmp-dev \ ; \ @@ -142,7 +141,6 @@ RUN set -ex; \ \ apk add --no-cache \ ffmpeg \ - imagemagick \ procps \ samba-client \ supervisor \ diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index ab44b741..a53d13b8 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -55,6 +55,14 @@ if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then if ! [ -f "/additional-php-extensions-are-installed" ]; then read -ra ADDITIONAL_PHP_EXTENSIONS_ARRAY <<< "$ADDITIONAL_PHP_EXTENSIONS" for app in "${ADDITIONAL_PHP_EXTENSIONS_ARRAY[@]}"; do + # shellcheck disable=SC2086 + if [ "$PHP_DEPS_ARE_INSTALLED" != 1 ]; then + echo "Installing PHP build dependencies..." + if ! apk add --no-cache --virtual .build-deps libxml2-dev imagemagick-dev autoconf $PHPIZE_DEPS >/dev/null; then + echo "Could not install build-deps!" + fi + PHP_DEPS_ARE_INSTALLED=1 + fi if [ "$app" = imagick ]; then echo "Installing Imagick via PECL..." pecl install imagick-3.7.0 >/dev/null @@ -74,19 +82,26 @@ if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then fi else echo "Installing PHP extension $app ..." - if pecl install "$app" >/dev/null; then + if ! docker-php-ext-install -j "$(nproc)" "$app" >/dev/null; then + echo "Could not install $app from core. Trying to install from PECL..." + pecl install "$app" >/dev/null if ! docker-php-ext-enable "$app" >/dev/null; then - echo "Could not install PHP extension $app!" - fi - else - echo "Could not install $app using PECL. Trying to install from core..." - if ! docker-php-ext-install -j "$(nproc)" "$app" >/dev/null; then - echo "Could also not install $app from core. The PHP extensions was not installed!" + echo "Could also not install $app from PECL. The PHP extensions was not installed!" fi fi fi done fi + rm -rf /tmp/pear + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; + # shellcheck disable=SC2086 + apk add --virtual .nextcloud-phpext-rundeps $runDeps >/dev/null + apk del .build-deps >/dev/null touch /additional-php-extensions-are-installed fi diff --git a/docker-compose.yml b/docker-compose.yml index b654038f..1a029f7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup - # - NEXTCLOUD_ADDITIONAL_APKS=imagick # This allows to add additional packages to the Nextcloud container permanently. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container + # - NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 50f60fd2..6e77ddd4 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -77,7 +77,7 @@ 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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # 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=imagick # This allows to add additional packages to the Nextcloud container permanently.|' sample.conf +sed -i 's|NEXTCLOUD_ADDITIONAL_APKS=|NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently.|' sample.conf sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index fb0a986a..a9b209e9 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -564,7 +564,7 @@ class ConfigurationManager public function GetNextcloudAdditionalApks() : string { $envVariableName = 'NEXTCLOUD_ADDITIONAL_APKS'; $configName = 'nextcloud_additional_apks'; - $defaultValue = ''; + $defaultValue = 'imagemagick'; return trim($this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue)); } diff --git a/readme.md b/readme.md index 220e8773..cbcd5ea9 100644 --- a/readme.md +++ b/readme.md @@ -470,7 +470,7 @@ You might want to adjust the Nextcloud apps that are installed upon the first st ### How to add packets permanently to the Nextcloud container? Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require external dependencies. -You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS="dependency1 dependency2"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer= +You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS="imagemagick dependency2 dependency3"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer=. By default added is `imagemagick`. If you want to keep that, you need to specify it as well. ### How to add PHP extensions permanently to the Nextcloud container? Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional php extensions into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require additional php extensions. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index 0b8e70a9..63a37502 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -16,7 +16,7 @@ See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `twofactor_totp deck tasks calendar contacts apporder`. -- [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed and not imagemagick. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=inotify`, the resulting Nextcloud container should have the inotify extension installed and not the imagick extension. You can now continue with [070-timezone-change.md](./070-timezone-change.md) From 84f54b58aa49a35f57efec44e69489abd7f33f0f Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 19:44:59 +0100 Subject: [PATCH 0155/3949] make explanation better Signed-off-by: Simon L --- docker-compose.yml | 2 +- manual-install/update-yaml.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1a029f7e..1abbbbee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup - # - NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container + # - 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. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 6e77ddd4..6981ad6e 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -77,7 +77,7 @@ 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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # 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.|' 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 sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf From 7a93ad0e4e89ebf3866a08008fa1d022b4a509e9 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 20:25:10 +0100 Subject: [PATCH 0156/3949] also allow digits Signed-off-by: Simon L --- Containers/mastercontainer/start.sh | 8 ++++---- readme.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index ba00eb0f..c41fd995 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -186,17 +186,17 @@ It is set to '$NEXTCLOUD_STARTUP_APPS'." fi fi if [ -n "$NEXTCLOUD_ADDITIONAL_APKS" ]; then - if ! echo "$NEXTCLOUD_ADDITIONAL_APKS" | grep -q "^[a-z _-]\+$"; then + if ! echo "$NEXTCLOUD_ADDITIONAL_APKS" | grep -q "^[a-z0-9 _-.]\+$"; then echo "You've set NEXTCLOUD_ADDITIONAL_APKS but not to an allowed value. -It needs to be a string. Allowed are small letters a-z, spaces, hyphens and '_'. +It needs to be a string. Allowed are small letters a-z, digits 0-9, spaces, hyphens, dots and '_'. It is set to '$NEXTCLOUD_ADDITIONAL_APKS'." exit 1 fi fi if [ -n "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" ]; then - if ! echo "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" | grep -q "^[a-z _-]\+$"; then + if ! echo "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" | grep -q "^[a-z0-9 _-.]\+$"; then echo "You've set NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS but not to an allowed value. -It needs to be a string. Allowed are small letters a-z, spaces, hyphens and '_'. +It needs to be a string. Allowed are small letters a-z, digits 0-9, spaces, hyphens, dots and '_'. It is set to '$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS'." exit 1 fi diff --git a/readme.md b/readme.md index cbcd5ea9..8c23a986 100644 --- a/readme.md +++ b/readme.md @@ -470,12 +470,12 @@ You might want to adjust the Nextcloud apps that are installed upon the first st ### How to add packets permanently to the Nextcloud container? Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require external dependencies. -You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS="imagemagick dependency2 dependency3"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer=. By default added is `imagemagick`. If you want to keep that, you need to specify it as well. +You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS="imagemagick dependency2 dependency3"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer=. By default added is `imagemagick`. If you want to keep that, you need to specify it as well. ### How to add PHP extensions permanently to the Nextcloud container? Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional php extensions into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require additional php extensions. -You can do so by adding `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS="imagick extension1 extension2"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default added is `imagick`. If you want to keep that, you need to specify it as well. +You can do so by adding `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS="imagick extension1 extension2"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default added is `imagick`. If you want to keep that, you need to specify it as well. ### Huge docker logs When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/ From cbf579df188588428ddf1758afac088e1c8b7b00 Mon Sep 17 00:00:00 2001 From: Zoey Date: Thu, 10 Nov 2022 20:40:22 +0100 Subject: [PATCH 0157/3949] fix regex syntax I forgot, that the "-" must be at the end of the regex Signed-off-by: Zoey --- Containers/mastercontainer/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index c41fd995..7c0276de 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -186,7 +186,7 @@ It is set to '$NEXTCLOUD_STARTUP_APPS'." fi fi if [ -n "$NEXTCLOUD_ADDITIONAL_APKS" ]; then - if ! echo "$NEXTCLOUD_ADDITIONAL_APKS" | grep -q "^[a-z0-9 _-.]\+$"; then + if ! echo "$NEXTCLOUD_ADDITIONAL_APKS" | grep -q "^[a-z0-9 ._-]\+$"; then echo "You've set NEXTCLOUD_ADDITIONAL_APKS but not to an allowed value. It needs to be a string. Allowed are small letters a-z, digits 0-9, spaces, hyphens, dots and '_'. It is set to '$NEXTCLOUD_ADDITIONAL_APKS'." @@ -194,7 +194,7 @@ It is set to '$NEXTCLOUD_ADDITIONAL_APKS'." fi fi if [ -n "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" ]; then - if ! echo "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" | grep -q "^[a-z0-9 _-.]\+$"; then + if ! echo "$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS" | grep -q "^[a-z0-9 ._-]\+$"; then echo "You've set NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS but not to an allowed value. It needs to be a string. Allowed are small letters a-z, digits 0-9, spaces, hyphens, dots and '_'. It is set to '$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS'." From bf4ef1147494a41ae0e33b9f062e52ed1eaebeb7 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 10 Nov 2022 20:46:18 +0100 Subject: [PATCH 0158/3949] fix removing of build dependencies Signed-off-by: Simon L --- Containers/nextcloud/start.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index a53d13b8..48cb2cd9 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -91,17 +91,19 @@ if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then fi fi done + if [ "$PHP_DEPS_ARE_INSTALLED" = 1 ]; then + rm -rf /tmp/pear + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; + # shellcheck disable=SC2086 + apk add --virtual .nextcloud-phpext-rundeps $runDeps >/dev/null + apk del .build-deps >/dev/null + fi fi - rm -rf /tmp/pear - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; - # shellcheck disable=SC2086 - apk add --virtual .nextcloud-phpext-rundeps $runDeps >/dev/null - apk del .build-deps >/dev/null touch /additional-php-extensions-are-installed fi From c5201731c3230e3d2649897baf28f24d8bcc121f Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 11 Nov 2022 15:23:40 +0100 Subject: [PATCH 0159/3949] fix spacing Signed-off-by: Simon L --- .github/workflows/nextcloud-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nextcloud-update.yml b/.github/workflows/nextcloud-update.yml index bc5eff30..674d81fd 100644 --- a/.github/workflows/nextcloud-update.yml +++ b/.github/workflows/nextcloud-update.yml @@ -57,7 +57,7 @@ jobs: | sort -V \ | tail -1 )" - sed -i "s|pecl install imagick.*|pecl install imagick-$imagick_version >/dev/null|" ./Containers/nextcloud/start.sh + sed -i "s|pecl install imagick.*|pecl install imagick-$imagick_version >/dev/null|" ./Containers/nextcloud/start.sh # Nextcloud NC_MAJOR="$(grep "ENV NEXTCLOUD_VERSION" ./Containers/nextcloud/Dockerfile | grep -oP '[23][0-9]')" From b6f8d3e8e9d9737c8420bdc35fb64e7f75ee73a3 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 11 Nov 2022 15:28:48 +0100 Subject: [PATCH 0160/3949] imaginary - add `-return-size` option by default Signed-off-by: Simon L --- Containers/imaginary/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index 32a35a85..ab6d1a19 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -13,4 +13,6 @@ RUN set -ex; \ rm -rf /var/lib/apt/lists/* USER nobody +ENTRYPOINT ["/usr/local/bin/imaginary", "-return-size"] + HEALTHCHECK CMD nc -z localhost 9000 || exit 1 \ No newline at end of file From cccf21805ea291812b9d1bcc5d1e4cd851c292d6 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 12 Nov 2022 12:17:20 +0000 Subject: [PATCH 0161/3949] Yaml updates Signed-off-by: GitHub --- manual-install/latest-arm64.yml | 8 ++++++-- manual-install/latest.yml | 8 ++++++-- manual-install/sample.conf | 6 +++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/manual-install/latest-arm64.yml b/manual-install/latest-arm64.yml index bffb2441..6b6198db 100644 --- a/manual-install/latest-arm64.yml +++ b/manual-install/latest-arm64.yml @@ -58,7 +58,7 @@ services: - nextcloud_aio_nextcloud:/var/www/html:rw - ${NEXTCLOUD_DATADIR}:/mnt/ncdata:rw - ${NEXTCLOUD_MOUNT}:${NEXTCLOUD_MOUNT}:rw - - ${TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro + - ${NEXTCLOUD_TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro environment: - POSTGRES_HOST=nextcloud-aio-database - POSTGRES_PASSWORD=${DATABASE_PASSWORD} @@ -89,10 +89,14 @@ services: - IMAGINARY_ENABLED=${IMAGINARY_ENABLED} - IMAGINARY_HOST=nextcloud-aio-imaginary - PHP_UPLOAD_LIMIT=${NEXTCLOUD_UPLOAD_LIMIT} + - PHP_MEMORY_LIMIT=${NEXTCLOUD_MEMORY_LIMIT} - FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED} - FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch - PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME} - - TRUSTED_CACERTS_DIR=${TRUSTED_CACERTS_DIR} + - TRUSTED_CACERTS_DIR=${NEXTCLOUD_TRUSTED_CACERTS_DIR} + - STARTUP_APPS=${NEXTCLOUD_STARTUP_APPS} + - ADDITIONAL_APKS=${NEXTCLOUD_ADDITIONAL_APKS} + - ADDITIONAL_PHP_EXTENSIONS=${NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS} stop_grace_period: 10s restart: unless-stopped networks: diff --git a/manual-install/latest.yml b/manual-install/latest.yml index 0d652f68..02300f94 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -59,7 +59,7 @@ services: - nextcloud_aio_nextcloud:/var/www/html:rw - ${NEXTCLOUD_DATADIR}:/mnt/ncdata:rw - ${NEXTCLOUD_MOUNT}:${NEXTCLOUD_MOUNT}:rw - - ${TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro + - ${NEXTCLOUD_TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro environment: - POSTGRES_HOST=nextcloud-aio-database - POSTGRES_PASSWORD=${DATABASE_PASSWORD} @@ -92,10 +92,14 @@ services: - IMAGINARY_ENABLED=${IMAGINARY_ENABLED} - IMAGINARY_HOST=nextcloud-aio-imaginary - PHP_UPLOAD_LIMIT=${NEXTCLOUD_UPLOAD_LIMIT} + - PHP_MEMORY_LIMIT=${NEXTCLOUD_MEMORY_LIMIT} - FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED} - FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch - PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME} - - TRUSTED_CACERTS_DIR=${TRUSTED_CACERTS_DIR} + - TRUSTED_CACERTS_DIR=${NEXTCLOUD_TRUSTED_CACERTS_DIR} + - STARTUP_APPS=${NEXTCLOUD_STARTUP_APPS} + - ADDITIONAL_APKS=${NEXTCLOUD_ADDITIONAL_APKS} + - ADDITIONAL_PHP_EXTENSIONS=${NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS} stop_grace_period: 10s restart: unless-stopped networks: diff --git a/manual-install/sample.conf b/manual-install/sample.conf index d8fc73a6..54ae4aff 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -11,10 +11,15 @@ FULLTEXTSEARCH_ENABLED=no # Setting this to "yes" enables the option in IMAGINARY_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. JANUS_API_KEY= # TODO! This needs to be a unique and good password! NC_DOMAIN=yourdomain.com # TODO! Needs to be changed to the domain that you want to use for Nextcloud. +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. +NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data # You can change this to e.g. "/mnt/ncdata" to map it to a location on your host. It needs to be adjusted before the first startup and never afterwards! NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container +NEXTCLOUD_MEMORY_LIMIT=512M # This allows to change the PHP memory limit of the Nextcloud container NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR! NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin". +NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time +NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory. NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container ONLYOFFICE_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. ONLYOFFICE_SECRET= # TODO! This needs to be a unique and good password! @@ -23,6 +28,5 @@ SIGNALING_SECRET= # TODO! This needs to be a unique and good password! TALK_ENABLED=yes # Setting this to "yes" enables the option in Nextcloud automatically. TALK_PORT=3478 # This allows to adjust the port that the talk container is using. TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use. -TRUSTED_CACERTS_DIR=/path/to/my/cacerts # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory. TURN_SECRET= # TODO! This needs to be a unique and good password! UPDATE_NEXTCLOUD_APPS=no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays. From 15526b6fed5525f4216b3ede7d6d9954cc0065b1 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 14 Nov 2022 17:31:45 +0100 Subject: [PATCH 0162/3949] re-add the password change Signed-off-by: Simon L --- Containers/nextcloud/start.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 48cb2cd9..7b9d3d2c 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -17,9 +17,11 @@ if [ -f "/var/www/html/config/config.php" ]; then echo "Waiting for the database to start..." sleep 5 done - # The code below is hopefully not needed anymore. Was introduced with https://github.com/nextcloud/all-in-one/pull/218 - # sed -i "s|'dbuser'.*=>.*$|'dbuser' => '$POSTGRES_USER',|" /var/www/html/config/config.php - # sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php + if [ "$POSTGRES_USER" = "oc_nextcloud" ] && echo "$POSTGRES_PASSWORD" | grep -q '^[a-z0-9]\+$'; then + # this was introduced with https://github.com/nextcloud/all-in-one/pull/218 + sed -i "s|'dbuser'.*=>.*$|'dbuser' => '$POSTGRES_USER',|" /var/www/html/config/config.php + sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php + fi fi # Trust additional Cacerts, if the user provided $TRUSTED_CACERTS_DIR From 72248fc4bd9998a7491a321c8f8411deba8bfb81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:03:57 +0000 Subject: [PATCH 0163/3949] Bump debian in /Containers/borgbackup Bumps debian from bullseye-20221024-slim to bullseye-20221114-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/borgbackup/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index eaf918a8..f3118ed6 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-20221024-slim +FROM debian:bullseye-20221114-slim RUN set -ex; \ \ From 2ad2d7c9eb8287a9c37c5014321642d023990f6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:04:28 +0000 Subject: [PATCH 0164/3949] Bump debian in /Containers/apache Bumps debian from bullseye-20221024-slim to bullseye-20221114-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index 2abf26ef..14442ff7 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,7 +1,7 @@ # Caddy is a requirement FROM caddy:2.6.2-alpine as caddy -FROM debian:bullseye-20221024-slim +FROM debian:bullseye-20221114-slim RUN mkdir -p /mnt/data; \ chown www-data:www-data /mnt/data; From 16b0f778950f0547a40dd8521f5e6f84136b8811 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Nov 2022 10:53:44 +0000 Subject: [PATCH 0165/3949] Bump postgres from 14.5-alpine to 14.6-alpine in /Containers/postgresql Bumps postgres from 14.5-alpine to 14.6-alpine. --- updated-dependencies: - dependency-name: postgres dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/postgresql/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/postgresql/Dockerfile b/Containers/postgresql/Dockerfile index ea83de61..d69d63b1 100644 --- a/Containers/postgresql/Dockerfile +++ b/Containers/postgresql/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/docker-library/postgres/blob/master/13/alpine/Dockerfile -FROM postgres:14.5-alpine +FROM postgres:14.6-alpine RUN apk add --update --no-cache bash openssl shadow netcat-openbsd grep mawk From de137f70aebfe93f444b5627e43f8d4d85638f2a Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 17 Nov 2022 13:38:09 +0100 Subject: [PATCH 0166/3949] add an AIO outdated notification Signed-off-by: Simon L --- Containers/mastercontainer/cron.sh | 3 +++ Containers/nextcloud/Dockerfile | 2 ++ Containers/nextcloud/notify-all.sh | 27 +++++++++++++++++++ php/src/Cron/OutdatedNotification.php | 26 +++++++++++++++++++ php/src/Docker/DockerActionManager.php | 36 ++++++++++++++++++++++++-- 5 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 Containers/nextcloud/notify-all.sh create mode 100644 php/src/Cron/OutdatedNotification.php diff --git a/Containers/mastercontainer/cron.sh b/Containers/mastercontainer/cron.sh index 1fe5ff8d..f8d09c4c 100644 --- a/Containers/mastercontainer/cron.sh +++ b/Containers/mastercontainer/cron.sh @@ -41,6 +41,9 @@ while true; do # Check for updates and send notification if yes sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateNotification.php + # Check if AIO is outdated + sudo -u www-data php /var/www/docker-aio/php/src/Cron/OutdatedNotification.php + # Remove sessions older than 24h find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index ccc7d8ca..b860683c 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -227,12 +227,14 @@ RUN set -ex; \ COPY start.sh / COPY notify.sh / +COPY notify-all.sh / RUN set -ex; \ chmod +x /start.sh && \ chmod +x /entrypoint.sh && \ chmod +r /upgrade.exclude && \ chmod +x /cron.sh && \ chmod +x /notify.sh && \ + chmod +x /notify-all.sh && \ chmod +x /activate-collabora.sh RUN set -ex; \ diff --git a/Containers/nextcloud/notify-all.sh b/Containers/nextcloud/notify-all.sh new file mode 100644 index 00000000..b11130d1 --- /dev/null +++ b/Containers/nextcloud/notify-all.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +if [[ "$EUID" = 0 ]]; then + COMMAND=(sudo -E -u www-data php /var/www/html/occ) +else + COMMAND=(php /var/www/html/occ) +fi + +SUBJECT="$1" +MESSAGE="$2" + +if [ "$("${COMMAND[@]}" config:app:get notifications enabled)" = "no" ]; then + echo "Cannot send notification as notification app is not enabled." + exit 1 +fi + +echo "Posting notifications to all users..." +NC_USERS=$("${COMMAND[@]}" user:list | sed 's|^ - ||g' | sed 's|:.*||') +mapfile -t NC_USERS <<< "$NC_USERS" +for user in "${NC_USERS[@]}" +do + echo "Posting '$SUBJECT' to: $user" + "${COMMAND[@]}" notification:generate "$user" "$NC_DOMAIN: $SUBJECT" -l "$MESSAGE" +done + +echo "Done!" +exit 0 \ No newline at end of file diff --git a/php/src/Cron/OutdatedNotification.php b/php/src/Cron/OutdatedNotification.php new file mode 100644 index 00000000..e652ba3a --- /dev/null +++ b/php/src/Cron/OutdatedNotification.php @@ -0,0 +1,26 @@ +get(\AIO\Docker\DockerActionManager::class); +/** @var \AIO\ContainerDefinitionFetcher $containerDefinitionFetcher */ +$containerDefinitionFetcher = $container->get(\AIO\ContainerDefinitionFetcher::class); + +$id = 'nextcloud-aio-nextcloud'; +$nextcloudContainer = $containerDefinitionFetcher->GetContainerById($id); + +$isNextcloudImageOutdated = $dockerActionManger->isNextcloudImageOutdated(); + +if ($isNextcloudImageOutdated === true) { + $dockerActionManger->sendNotification($nextcloudContainer, 'AIO is outdated!', 'Please open the AIO interface or ask an administrator to update it. If you do not want to do it manually each time, you can enable the daily backup feature from the AIO interface which automatically updates all containers.', '/notify-all.sh'); +} + diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 8eee831c..9550dd44 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -540,7 +540,7 @@ class DockerActionManager return true; } - public function sendNotification(Container $container, string $subject, string $message) : void + public function sendNotification(Container $container, string $subject, string $message, string $file = '/notify.sh') : void { if ($this->GetContainerStartingState($container) instanceof RunningState) { @@ -558,7 +558,7 @@ class DockerActionManager 'Tty' => true, 'Cmd' => [ 'bash', - '/notify.sh', + $file, $subject, $message ], @@ -739,4 +739,36 @@ class DockerActionManager } return false; } + + private function GetCreatedTimeOfNextcloudImage() : ?string { + $imageName = 'nextcloud/aio-nextcloud' . ':' . $this->GetCurrentChannel(); + try { + $imageUrl = $this->BuildApiUrl(sprintf('images/%s/json', $imageName)); + $imageOutput = json_decode($this->guzzleClient->get($imageUrl)->getBody()->getContents(), true); + + if (!isset($imageOutput['Created'])) { + error_log('Created is not set of image ' . $imageName); + return null; + } + + return str_replace('T', ' ', $imageOutput['Created']); + } catch (\Exception $e) { + return null; + } + } + + public function isNextcloudImageOutdated() : bool { + $createdTime = $this->GetCreatedTimeOfNextcloudImage(); + + if ($createdTime === null) { + return false; + } + + // If the image is older than 90 days, it is outdated. + if ((time() - (60 * 60 * 24 * 90)) > strtotime($createdTime)) { + return true; + } + + return false; + } } From 77a0717417607be5c409591808f9d9866c1279cd Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 17 Nov 2022 17:54:09 +0100 Subject: [PATCH 0167/3949] make update process more stable Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 52 +++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index c0f365c0..781e9d60 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -85,6 +85,13 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then # Check if it skips a major version INSTALLED_MAJOR="${installed_version%%.*}" IMAGE_MAJOR="${image_version%%.*}" + + if [ "$installed_version" != "0.0.0.0" ]; then + # Write output to logfile. + exec > >(tee -i "/var/www/html/data/update.log") + exec 2>&1 + fi + if [ "$installed_version" != "0.0.0.0" ] && [ "$((IMAGE_MAJOR - INSTALLED_MAJOR))" -gt 1 ]; then set -ex NEXT_MAJOR="$((INSTALLED_MAJOR + 1))" @@ -133,7 +140,19 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then php /var/www/html/occ maintenance:mode --off echo "Getting and backing up the status of apps for later, this might take a while..." - php /var/www/html/occ app:list | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + NC_APPS="$(find /var/www/html/custom_apps/ -type d -maxdepth 1 -mindepth 1 | sed 's|/var/www/html/custom_apps/||g')" + if [ -z "$NC_APPS" ]; then + echo "No apps detected, aborting export of app status..." + APPSTORAGE="no-export-done" + else + read -ra NC_APPS_ARRAY <<< "$NC_APPS" + declare -Ag APPSTORAGE + echo "Disabling apps before the update in order to make the update procedure more safe. This can take a while..." + for app in "${NC_APPS_ARRAY[@]}"; do + APPSTORAGE[$app]=$(php /var/www/html/occ config:app:get "$app" enabled) + php /var/www/html/occ app:disable "$app" + done + fi if [ "$((IMAGE_MAJOR - INSTALLED_MAJOR))" -eq 1 ]; then php /var/www/html/occ config:system:delete app_install_overwrite @@ -238,13 +257,6 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then #upgrade else - touch "$NEXTCLOUD_DATA_DIR/update.failed" - while [ -n "$(pgrep -f cron.php)" ] - do - echo "Waiting for Nextclouds cronjob to finish..." - sleep 5 - done - echo "Upgrading nextcloud from $installed_version to $image_version..." if ! php /var/www/html/occ upgrade || ! php /var/www/html/occ -V; then echo "Upgrade failed. Please restore from backup." @@ -255,10 +267,26 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then rm "$NEXTCLOUD_DATA_DIR/update.failed" bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info." - php /var/www/html/occ app:list | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after + # Restore app status + if [ "${APPSTORAGE[0]}" != "no-export-done" ]; then + echo "Restoring the status of apps. This can take a while..." + for app in "${!APPSTORAGE[@]}"; do + if [ -n "${APPSTORAGE[$app]}" ]; then + if [ "${APPSTORAGE[$app]}" != "no" ]; then + echo "Enabling $app..." + if ! php /var/www/html/occ app:enable "$app" >/dev/null; then + echo "$app could not get enabled. Probably because it is not compatible with the new Nextcloud version." + bash /notify.sh "Could not enable the $app after the Nextcloud update!" "Feel free to look at the Nextcloud update logs and force-enable the app again from the app-store UI." + continue + fi + # Only restore the group settings, if the app was enabled (and is thus compatible with the new NC version) + if [ "${APPSTORAGE[$app]}" != "yes" ]; then + nextcloud_occ_no_check config:app:set "$app" enabled --value="${APPSTORAGE[$app]}" + fi + fi + fi + done + fi # Apply optimization echo "Doing some optimizations..." From 64f37b959ec63746137eb19dfaaf74ed679d6717 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:04:02 +0000 Subject: [PATCH 0168/3949] Bump alpine from 3.16.2 to 3.16.3 in /Containers/domaincheck Bumps alpine from 3.16.2 to 3.16.3. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/domaincheck/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/domaincheck/Dockerfile b/Containers/domaincheck/Dockerfile index 57192bcc..af023d27 100644 --- a/Containers/domaincheck/Dockerfile +++ b/Containers/domaincheck/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.16.2 +FROM alpine:3.16.3 RUN apk add --update --no-cache lighttpd bash curl netcat-openbsd RUN adduser -S www-data -G www-data From c3aa304e0824ea6adf2273c906548ba6ef6e3b8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:04:06 +0000 Subject: [PATCH 0169/3949] Bump alpine from 3.16.2 to 3.16.3 in /Containers/watchtower Bumps alpine from 3.16.2 to 3.16.3. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/watchtower/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/watchtower/Dockerfile b/Containers/watchtower/Dockerfile index 493af190..ade549bc 100644 --- a/Containers/watchtower/Dockerfile +++ b/Containers/watchtower/Dockerfile @@ -1,7 +1,7 @@ # From https://github.com/containrrr/watchtower/blob/main/dockerfiles/Dockerfile.self-contained FROM containrrr/watchtower:1.5.1 as watchtower -FROM alpine:3.16.2 +FROM alpine:3.16.3 RUN apk add --update --no-cache bash COPY --from=watchtower /watchtower / From 374b7bf7a67f0a9ea4d37321d75963a78c862806 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 17 Nov 2022 18:05:23 +0100 Subject: [PATCH 0170/3949] make sure that all apps are up-to-date Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 781e9d60..ec9b6403 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -267,6 +267,8 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then rm "$NEXTCLOUD_DATA_DIR/update.failed" bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info." + php /var/www/html/occ app:update --all + # Restore app status if [ "${APPSTORAGE[0]}" != "no-export-done" ]; then echo "Restoring the status of apps. This can take a while..." @@ -281,13 +283,15 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then fi # Only restore the group settings, if the app was enabled (and is thus compatible with the new NC version) if [ "${APPSTORAGE[$app]}" != "yes" ]; then - nextcloud_occ_no_check config:app:set "$app" enabled --value="${APPSTORAGE[$app]}" + php /var/www/html/occ config:app:set "$app" enabled --value="${APPSTORAGE[$app]}" fi fi fi done fi + php /var/www/html/occ app:update --all + # Apply optimization echo "Doing some optimizations..." php /var/www/html/occ maintenance:repair From bec7ee9a76b88e2a51a9899c268d3beacaabfce4 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 19 Nov 2022 12:27:48 +0100 Subject: [PATCH 0171/3949] re-order the docker-compose entries partially alphabetically Signed-off-by: Simon L --- docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1abbbbee..f70c949b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,19 +19,19 @@ services: # environment: # Is needed when using any of the options below # - APACHE_PORT=11000 # Is needed when running behind a reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # - APACHE_IP_BINDING=127.0.0.1 # Should be set when running behind a reverse proxy that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md - # - TALK_PORT=3478 # This allows to adjust the port that the talk container is using. - # - NEXTCLOUD_DATADIR=/mnt/ncdata # Allows to set the host directory for Nextcloud's datadir. See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir - # - NEXTCLOUD_MOUNT=/mnt/ # Allows the Nextcloud container to access the chosen directory on the host. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host + # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - DOCKER_SOCKET_PATH=/var/run/docker.sock # Needs to be specified if the docker socket on the host is not located in the default '/var/run/docker.sock'. Otherwise mastercontainer updates will fail. # - DISABLE_BACKUP_SECTION=true # Setting this to true allows to hide the backup section in the AIO interface. + # - NEXTCLOUD_DATADIR=/mnt/ncdata # Allows to set the host directory for Nextcloud's datadir. See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir + # - NEXTCLOUD_MOUNT=/mnt/ # Allows the Nextcloud container to access the chosen directory on the host. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - NEXTCLOUD_MEMORY_LIMIT=512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup # - 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. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container + # - TALK_PORT=3478 # This allows to adjust the port that the talk container is using. # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 From d45c42f8ed577ee5fa1519db4ad401794eb9a554 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 19 Nov 2022 12:31:40 +0100 Subject: [PATCH 0172/3949] add a hint to also set docker_socket_path Signed-off-by: Simon L --- docker-compose.yml | 2 +- readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f70c949b..222e69a2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed volumes: - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed - - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation + - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set `DOCKER_SOCKET_PATH`! ports: - 80:80 # Can be removed when running behind a reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md - 8080:8080 diff --git a/readme.md b/readme.md index 8c23a986..0ca0ef3b 100644 --- a/readme.md +++ b/readme.md @@ -62,7 +62,7 @@ The following instructions are especially meant for Linux. For macOS see [this]( - `--publish 8080:8080` This means that port 8080 of the container should get published on the host using port 8080. This port is used for the AIO interface and uses a self-signed certificate by default. You can also use a different host port if port 8080 is already used on your host, for example `--publish 8081:8080` (only the first port can be changed for the host, the second port is for the container and must remain at 8080). - `--publish 8443:8443` This means that port 8443 of the container should get published on the host using port 8443. If you publish port 80 and 8443 to the public internet, you can access the AIO interface via this port with a valid certificate. It is not needed if you run AIO behind a reverse proxy and can get removed in that case as you can simply use port 8080 for the AIO interface then. - `--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config` This means that the files that are created by the mastercontainer will be stored in a docker volume that is called `nextcloud_aio_mastercontainer`. This line is not allowed to be changed, since built-in backups would fail later on. - - `--volume /var/run/docker.sock:/var/run/docker.sock:ro` The docker socket is mounted into the container which is used for spinning up all the other containers and for further features. It needs to be adjusted on Windows/macOS and on docker rootless. See the applicable documentation on this. If you dislike this, see https://github.com/nextcloud/all-in-one/discussions/500#discussioncomment-2740767 and the whole thread for options. + - `--volume /var/run/docker.sock:/var/run/docker.sock:ro` The docker socket is mounted into the container which is used for spinning up all the other containers and for further features. It needs to be adjusted on Windows/macOS and on docker rootless. See the applicable documentation on this. If adjusting, don't forget to also set `DOCKER_SOCKET_PATH`! If you dislike this, see https://github.com/nextcloud/all-in-one/discussions/500#discussioncomment-2740767 and the whole thread for options. - `nextcloud/all-in-one:latest` or `nextcloud/all-in-one:latest-arm64` This is the docker container image that is used. See https://github.com/nextcloud/all-in-one/discussions/490 for why there are different images for the different CPU architectures. - Further options can be set using environment variables, for example `--env TALK_PORT=3478`. To see explanations and examples for further variables (like changing the location of Nextcloud's datadir or mounting some locations as external storage into the Nextcloud container), read through this readme and look at the docker-compose file: https://github.com/nextcloud/all-in-one/blob/main/docker-compose.yml From ed7b1e3cba20e713328190c01044889ec01f7c59 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 19 Nov 2022 12:32:42 +0100 Subject: [PATCH 0173/3949] adjust quotation marks Signed-off-by: Simon L --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 222e69a2..bcdcbfc2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed volumes: - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed - - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set `DOCKER_SOCKET_PATH`! + - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'DOCKER_SOCKET_PATH'! ports: - 80:80 # Can be removed when running behind a reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md - 8080:8080 From ccd4c9046af92679dcae05c2560fba382b1e7d14 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 19 Nov 2022 12:58:46 +0100 Subject: [PATCH 0174/3949] invert the default for DISABLE_BACKUP_SECTION Signed-off-by: Simon L --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index bcdcbfc2..b118e11a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ services: # - APACHE_IP_BINDING=127.0.0.1 # Should be set when running behind a reverse proxy that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature # - DOCKER_SOCKET_PATH=/var/run/docker.sock # Needs to be specified if the docker socket on the host is not located in the default '/var/run/docker.sock'. Otherwise mastercontainer updates will fail. - # - DISABLE_BACKUP_SECTION=true # Setting this to true allows to hide the backup section in the AIO interface. + # - DISABLE_BACKUP_SECTION=false # Setting this to true allows to hide the backup section in the AIO interface. # - NEXTCLOUD_DATADIR=/mnt/ncdata # Allows to set the host directory for Nextcloud's datadir. See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir # - NEXTCLOUD_MOUNT=/mnt/ # Allows the Nextcloud container to access the chosen directory on the host. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud From daa9a94ebd3124e5f7382922c7bebe49b02351b4 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 19 Nov 2022 13:50:32 +0100 Subject: [PATCH 0175/3949] add a guide on how to run automatic updates without creating a backup first Signed-off-by: Simon L --- readme.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/readme.md b/readme.md index 0ca0ef3b..37d9f0c5 100644 --- a/readme.md +++ b/readme.md @@ -537,3 +537,77 @@ In order for the value to be valid, the path should start with `/` and not end w ### How to disable Collabora's Seccomp feature? The Collabora container enables Seccomp by default, which is a security feature of the Linux kernel. On systems without this kernel feature enabled, you need to provide `-e COLLABORA_SECCOMP_DISABLED=true` to the initial docker run command in order to make it work. + +### How to enable automatic updates without creating a backup beforehand? +If you have an external backup solution, you might want to enable automatic updates without creating a backup first. However note that doing this is not recommended since you will not be able to easily create and restore a backup from the AIO interface anymore and you need to make sure to shut down all the containers properly before creating the backup, e.g. by stopping them from the AIO interface first. + +But anyhow, is here a guide that helps you automate the whole procedure: + +
+Click here to expand + +```bash +#!/bin/bash + +docker exec -e STOP_CONTAINERS=1 nextcloud-aio-mastercontainer /daily-backup.sh + +# Below is optional if you run AIO in a VM which will shut down the VM afterwards +# poweroff + +``` + +
+ +You can simply copy and past the script into a file e.g. named `shutdown-script.sh` e.g. here: `/root/shutdown-script.sh`. + +Afterwards apply the correct permissions with `sudo chown root:root /root/shutdown-script.sh` and `sudo chmod 700 /root/shutdown-script.sh`. Then you can create a cronjob that runs e.g. runs the script at `04:00` each day like this: +1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano). +1. Add the following new line to the crontab if not already present: `0 4 * * * /root/shutdown-script.sh` which will run the script at 04:00 each day. +1. save and close the crontab (when using nano are the shortcuts for this `Ctrl + o` -> `Enter` and close the editor with `Ctrl + x`). + + +**After that is in place, you should schedule a backup from your backup solution that creates a backup after AIO is shut down properly.** + +**Afterwards, you can create a second script that automatically updates the containers:** + +
+Click here to expand + +```bash +#!/bin/bash + +# Please modify all variables below to your needings: +APACHE_PORT="443" # This needs to match the chosen APACHE_PORT port of AIO, e.g. 11000. By default it is 443. + +######################################## +# Please do NOT modify anything below! # +######################################## + +# Run container update once +docker exec -e AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh + +# Wait until Watchtower is finished +while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do + echo "Waiting for watchtower to stop" + sleep 30 +done + +# Wait until Apache is running again +while nc -z localhost "$APACHE_PORT"; do + echo "Waiting for Apache to start" + sleep 30 +done + +# Run container update another time to make sure that all containers are updated correctly. +docker exec -e AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh + +``` + +
+ +You can simply copy and past the script into a file e.g. named `automatic-updates.sh` e.g. here: `/root/automatic-updates.sh`. Do not forget to modify the variables to your requirements! + +Afterwards apply the correct permissions with `sudo chown root:root /root/automatic-updates.sh` and `sudo chmod 700 /root/automatic-updates.sh`. Then you can create a cronjob that runs e.g. at `05:00` each day like this: +1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano). +1. Add the following new line to the crontab if not already present: `0 5 * * * /root/automatic-updates.sh` which will run the script at 05:00 each day. +1. save and close the crontab (when using nano are the shortcuts for this `Ctrl + o` -> `Enter` and close the editor with `Ctrl + x`). From e323f9770b9c7e0395e22d663336bf4c19277c18 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 20 Nov 2022 00:59:40 +0100 Subject: [PATCH 0176/3949] improve the script Signed-off-by: Simon L --- readme.md | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/readme.md b/readme.md index 37d9f0c5..02f2022a 100644 --- a/readme.md +++ b/readme.md @@ -549,6 +549,7 @@ But anyhow, is here a guide that helps you automate the whole procedure: ```bash #!/bin/bash +# Stop the containers docker exec -e STOP_CONTAINERS=1 nextcloud-aio-mastercontainer /daily-backup.sh # Below is optional if you run AIO in a VM which will shut down the VM afterwards @@ -566,7 +567,7 @@ Afterwards apply the correct permissions with `sudo chown root:root /root/shutdo 1. save and close the crontab (when using nano are the shortcuts for this `Ctrl + o` -> `Enter` and close the editor with `Ctrl + x`). -**After that is in place, you should schedule a backup from your backup solution that creates a backup after AIO is shut down properly.** +**After that is in place, you should schedule a backup from your backup solution that creates a backup after AIO is shut down properly. Hint: If your backup runs on the same host, make sure to at least back up all docker volumes and additionally Nextclouds datadir, if it is not stored in a docker volume.** **Afterwards, you can create a second script that automatically updates the containers:** @@ -576,36 +577,27 @@ Afterwards apply the correct permissions with `sudo chown root:root /root/shutdo ```bash #!/bin/bash -# Please modify all variables below to your needings: -APACHE_PORT="443" # This needs to match the chosen APACHE_PORT port of AIO, e.g. 11000. By default it is 443. - -######################################## -# Please do NOT modify anything below! # -######################################## - # Run container update once -docker exec -e AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh +if ! docker exec -e AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh; then + while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do + echo "Waiting for watchtower to stop" + sleep 30 + done -# Wait until Watchtower is finished -while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do - echo "Waiting for watchtower to stop" - sleep 30 -done + while ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-mastercontainer$"; do + echo "Waiting for Mastercontainer to start" + sleep 30 + done -# Wait until Apache is running again -while nc -z localhost "$APACHE_PORT"; do - echo "Waiting for Apache to start" - sleep 30 -done - -# Run container update another time to make sure that all containers are updated correctly. -docker exec -e AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh + # Run container update another time to make sure that all containers are updated correctly. + docker exec -e AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh +fi ``` -You can simply copy and past the script into a file e.g. named `automatic-updates.sh` e.g. here: `/root/automatic-updates.sh`. Do not forget to modify the variables to your requirements! +You can simply copy and past the script into a file e.g. named `automatic-updates.sh` e.g. here: `/root/automatic-updates.sh`. Afterwards apply the correct permissions with `sudo chown root:root /root/automatic-updates.sh` and `sudo chmod 700 /root/automatic-updates.sh`. Then you can create a cronjob that runs e.g. at `05:00` each day like this: 1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano). From ebe30e69f9b556fddc3c4800d1261f7b0e8123e9 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 20 Nov 2022 01:36:55 +0100 Subject: [PATCH 0177/3949] make sure to only trigger the daily-backup script if daily_backups are really enabled Signed-off-by: Simon L --- Containers/mastercontainer/cron.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Containers/mastercontainer/cron.sh b/Containers/mastercontainer/cron.sh index f8d09c4c..563b1ef6 100644 --- a/Containers/mastercontainer/cron.sh +++ b/Containers/mastercontainer/cron.sh @@ -13,14 +13,14 @@ while true; do export START_CONTAINERS=1 fi set +x + if [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then + export LOCK_FILE_PRESENT=1 + else + export LOCK_FILE_PRESENT=0 + fi else export BACKUP_TIME="04:00" export DAILY_BACKUP=0 - fi - - if [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then - export LOCK_FILE_PRESENT=1 - else export LOCK_FILE_PRESENT=0 fi From 9e0079effc1e561cd9adacefc5af5e94617dae17 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 21 Nov 2022 17:26:28 +0100 Subject: [PATCH 0178/3949] increase to 3.1.0 Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 40380d20..83228add 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v3.0.0

+

Nextcloud AIO v3.1.0

{# Add 2nd tab warning #} From 4a1539b4739349f6b5aaf93541c4efb57d2ad791 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 21 Nov 2022 18:26:36 +0100 Subject: [PATCH 0179/3949] dont restore ocsp folder Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index a5cf1f45..3af51391 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -262,6 +262,7 @@ if [ "$BORG_MODE" = restore ]; then --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \ --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ + --exclude "nextcloud_aio_apache/caddy/ocsp/"** \ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring from backup." umount /tmp/borg From b02d5cde1a29c0e17f0cb1c132c8fce6f8383b46 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 21 Nov 2022 18:38:34 +0100 Subject: [PATCH 0180/3949] fix the new update process Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index ec9b6403..d932b6b8 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -145,7 +145,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then echo "No apps detected, aborting export of app status..." APPSTORAGE="no-export-done" else - read -ra NC_APPS_ARRAY <<< "$NC_APPS" + mapfile -t NC_APPS_ARRAY <<< "$NC_APPS" declare -Ag APPSTORAGE echo "Disabling apps before the update in order to make the update procedure more safe. This can take a while..." for app in "${NC_APPS_ARRAY[@]}"; do @@ -257,6 +257,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then #upgrade else + touch "$NEXTCLOUD_DATA_DIR/update.failed" echo "Upgrading nextcloud from $installed_version to $image_version..." if ! php /var/www/html/occ upgrade || ! php /var/www/html/occ -V; then echo "Upgrade failed. Please restore from backup." From 6b6500c29dc393ced503c0790c4b51c0564a68e3 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 21 Nov 2022 19:03:17 +0100 Subject: [PATCH 0181/3949] just exclude the whole dir on restore Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 3af51391..2736edc5 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -262,7 +262,8 @@ if [ "$BORG_MODE" = restore ]; then --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \ --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ - --exclude "nextcloud_aio_apache/caddy/ocsp/"** \ + --exclude "nextcloud_aio_apache/caddy/"** \ + --exclude "nextcloud_aio_mastercontainer/caddy/"** \ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring from backup." umount /tmp/borg From 3fa584442b2e9ca6bdf7a04b588ae31978435624 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 24 Nov 2022 11:39:05 +0100 Subject: [PATCH 0182/3949] change not recommended to disrecommended Signed-off-by: Simon L --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 02f2022a..3695fe39 100644 --- a/readme.md +++ b/readme.md @@ -468,12 +468,12 @@ You can run AIO also with docker rootless. How to do this is documented here: [d You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts apporder"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. ### How to add packets permanently to the Nextcloud container? -Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require external dependencies. +Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require external dependencies. You can do so by adding `-e NEXTCLOUD_ADDITIONAL_APKS="imagemagick dependency2 dependency3"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?name=&branch=v3.16&repo=&arch=&maintainer=. By default added is `imagemagick`. If you want to keep that, you need to specify it as well. ### How to add PHP extensions permanently to the Nextcloud container? -Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional php extensions into the Nextcloud container. However note that doing this is not recommended since we do not test Nextcloud apps that require additional php extensions. +Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional php extensions into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require additional php extensions. You can do so by adding `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS="imagick extension1 extension2"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default added is `imagick`. If you want to keep that, you need to specify it as well. @@ -539,7 +539,7 @@ In order for the value to be valid, the path should start with `/` and not end w The Collabora container enables Seccomp by default, which is a security feature of the Linux kernel. On systems without this kernel feature enabled, you need to provide `-e COLLABORA_SECCOMP_DISABLED=true` to the initial docker run command in order to make it work. ### How to enable automatic updates without creating a backup beforehand? -If you have an external backup solution, you might want to enable automatic updates without creating a backup first. However note that doing this is not recommended since you will not be able to easily create and restore a backup from the AIO interface anymore and you need to make sure to shut down all the containers properly before creating the backup, e.g. by stopping them from the AIO interface first. +If you have an external backup solution, you might want to enable automatic updates without creating a backup first. However note that doing this is disrecommended since you will not be able to easily create and restore a backup from the AIO interface anymore and you need to make sure to shut down all the containers properly before creating the backup, e.g. by stopping them from the AIO interface first. But anyhow, is here a guide that helps you automate the whole procedure: From b13e8afe18aa05d7ac7ae418ad2047677b376b96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Nov 2022 12:05:30 +0000 Subject: [PATCH 0183/3949] Bump collabora/code in /Containers/collabora Bumps collabora/code from 22.05.8.2.1 to 22.05.8.4.1. --- updated-dependencies: - dependency-name: collabora/code dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/collabora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 6115a0a6..1a168ca6 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -1,5 +1,5 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker -FROM collabora/code:22.05.8.2.1 +FROM collabora/code:22.05.8.4.1 USER root From 9019fda7e41051e94b0ee1acb9255aa6f9b4f3de Mon Sep 17 00:00:00 2001 From: Zoey Date: Mon, 28 Nov 2022 15:41:33 +0100 Subject: [PATCH 0184/3949] Fix reverse proxy documentation for nginx Signed-off-by: Zoey --- reverse-proxy.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 6affb824..f0089b63 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -243,18 +243,19 @@ map $http_upgrade $connection_upgrade { server { listen 80; -# listen [::]:80; # uncomment to use IPv6 + listen [::]:80; # comment to disable IPv6 if ($scheme = "http") { return 301 https://$host$request_uri; } listen 443 ssl http2; -# listen [::]:443 ssl http2; # uncomment to use IPv6 + listen [::]:443 ssl http2; # comment to disable IPv6 server_name ; location / { + resolver localhost; proxy_pass http://localhost:11000$request_uri; proxy_set_header Host $host; From 459fe462ab46d9b439e36ba9b34c5116ebe8fdef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 12:05:36 +0000 Subject: [PATCH 0185/3949] Bump php in /Containers/nextcloud Bumps php from 8.0.25-fpm-alpine3.16 to 8.0.26-fpm-alpine3.16. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index b860683c..bdd8574a 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/nextcloud/docker/blob/master/23/fpm-alpine/Dockerfile -FROM php:8.0.25-fpm-alpine3.16 +FROM php:8.0.26-fpm-alpine3.16 # Custom: change id of www-data user as it needs to be the same like on old installations RUN set -ex; \ From 0969d0582a1fcda168969faca577e73ec68890f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 12:05:53 +0000 Subject: [PATCH 0186/3949] Bump php in /Containers/mastercontainer Bumps php from 8.0.25-apache-bullseye to 8.0.26-apache-bullseye. --- updated-dependencies: - dependency-name: php dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index d120fd0d..816954b0 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -5,7 +5,7 @@ FROM docker:20.10.21-dind-alpine3.16 as dind FROM caddy:2.6.2-alpine as caddy # From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile -FROM php:8.0.25-apache-bullseye +FROM php:8.0.26-apache-bullseye EXPOSE 80 EXPOSE 8080 From d5db7568fef0a216e4d46384636e358459366b53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 12:24:51 +0000 Subject: [PATCH 0187/3949] Bump clamav/clamav from 0.105.1 to 0.105.1-7 in /Containers/clamav Bumps clamav/clamav from 0.105.1 to 0.105.1-7. --- updated-dependencies: - dependency-name: clamav/clamav dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/clamav/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/clamav/Dockerfile b/Containers/clamav/Dockerfile index 98fc3fef..28b53e3b 100644 --- a/Containers/clamav/Dockerfile +++ b/Containers/clamav/Dockerfile @@ -1,5 +1,5 @@ # Probably from this file: https://github.com/Cisco-Talos/clamav/blob/main/Dockerfile -FROM clamav/clamav:0.105.1 +FROM clamav/clamav:1.0.0 RUN apk add --update --no-cache tzdata COPY clamav.conf /tmp/ From 3b9727086270797974436c4a6189a3cd1b98ae32 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 1 Dec 2022 03:09:36 +0100 Subject: [PATCH 0188/3949] adjust migration docs Signed-off-by: Simon L --- migration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration.md b/migration.md index 96573886..e777cce9 100644 --- a/migration.md +++ b/migration.md @@ -3,7 +3,7 @@ There are basically three ways how to migrate from an already existing Nextcloud installation to Nextcloud AIO: 1. Migrate only the files which is the easiest way -1. Migrate the files and the database which is much more complicated +1. Migrate the files and the database which is much more complicated (and doesn't work on former snap installations) 1. Use the user_migration app that allows to migrate some of the user's data from a former instance to a new instance but needs to be done manually for each user ## Migrate only the files @@ -20,7 +20,7 @@ The procedure for migrating only the files works like this: 1. Run `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan-app-data && sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all` in order to scan all files in the datadirectory. ## Migrate the files and the database -**Please note**: this is much more complicated than migrating only the files and also not as failproof so be warned! +**Please note**: this is much more complicated than migrating only the files and also not as failproof so be warned! Also, this will not work on former snap installations as the snap is read-only and thus you cannot install the necessary `pdo_pgsql` PHP extension. The procedure for migrating the files and the database works like this: 1. Make sure that your old instance is on exactly the same version like the version used in Nextcloud AIO. (e.g. 23.0.0) You can find the used version here: [click here](https://github.com/nextcloud/all-in-one/search?l=Dockerfile&q=NEXTCLOUD_VERSION&type=). If not, simply upgrade your former installation to that version or wait until the version used in Nextcloud AIO got updated to the same version of your former installation or the other way around. @@ -44,8 +44,8 @@ The procedure for migrating the files and the database works like this: ``` occ db:convert-type --all-apps --password "$PG_PASSWORD" pgsql "$PG_USER" 127.0.0.1 "$PG_DATABASE" ``` - **Please note:** You might need to change the ip-address `127.0.0.1` based on your exact installation.
- Further information on the conversion is additionally available here: https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/db_conversion.html#converting-database-type + **Please note:** You might need to change the ip-address `127.0.0.1` and adjust the occ command (`occ`) based on your exact installation. Further information on the conversion is additionally available here: https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/db_conversion.html#converting-database-type
+ **Troubleshooting:** If you get an error that it could not find a driver for the conversion, you most likely need to install the PHP extension `pdo_pgsql`. 1. Hopefully does the conversion finish successfully. If not, simply restore your old Nextcloud installation from backup. If yes, you should now log in to your Nextcloud and test if everything works and if all data has been converted successfully. 1. If everything works as expected, feel free to continue with the steps below. 1. Now, run a pg_dump to get an export of your current database. Something like the following command should work: From 170e5126909929000248749a3b559d7c13b4d13e Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Thu, 1 Dec 2022 04:24:32 +0000 Subject: [PATCH 0189/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index 96bfc692..ca42d23c 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From d632df56bd6d7dd603e8d9bf450338d4d83e3e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Casero=20Hern=C3=A1ndez?= Date: Thu, 1 Dec 2022 10:35:21 +0100 Subject: [PATCH 0190/3949] Update readme.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated readme by including the info about "what happens if local storage doesn't appear on the interface" Signed-off-by: Sergio Casero Hernández --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index 3695fe39..a8934290 100644 --- a/readme.md +++ b/readme.md @@ -446,6 +446,8 @@ You can then navigate to the apps management page, activate the external storage Be aware though that these locations will not be covered by the built-in backup solution! +Note: If you can't see the type "local storage" in the admin options, a restart of the nextcloud containers may be required, go to YOUR_IP/containers, and restart them + ### How to adjust the Talk port? By default will the talk container use port `3478/UDP` and `3478/TCP` for connections. You can adjust the port by adding e.g. `-e TALK_PORT=3478` to the initial docker run command and adjusting the port to your desired value. From f8820cb7c9fc8c4692ea8cd1b78d6b258a989bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Casero=20Hern=C3=A1ndez?= Date: Thu, 1 Dec 2022 10:47:32 +0100 Subject: [PATCH 0191/3949] Update readme.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Simon L. Signed-off-by: Sergio Casero Hernández --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index a8934290..77ddb729 100644 --- a/readme.md +++ b/readme.md @@ -446,7 +446,7 @@ You can then navigate to the apps management page, activate the external storage Be aware though that these locations will not be covered by the built-in backup solution! -Note: If you can't see the type "local storage" in the admin options, a restart of the nextcloud containers may be required, go to YOUR_IP/containers, and restart them +**Please note:** If you can't see the type "local storage" in the external storage admin options, a restart of the containers from the AIO interface may be required. ### How to adjust the Talk port? By default will the talk container use port `3478/UDP` and `3478/TCP` for connections. You can adjust the port by adding e.g. `-e TALK_PORT=3478` to the initial docker run command and adjusting the port to your desired value. From 9d305844bf560e87c6d2a8ee5b3002e88f4bfaed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Dec 2022 12:09:26 +0000 Subject: [PATCH 0192/3949] Bump nextcloud/imaginary in /Containers/imaginary Bumps nextcloud/imaginary from 20221101 to 20221201. --- updated-dependencies: - dependency-name: nextcloud/imaginary dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Containers/imaginary/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index ab6d1a19..d1988090 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/h2non/imaginary/blob/master/Dockerfile -FROM nextcloud/imaginary:20221101 +FROM nextcloud/imaginary:20221201 USER root RUN set -ex; \ From 1ef7945c3122362e029dfa13463e308cdc08e8a5 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 1 Dec 2022 16:14:58 +0100 Subject: [PATCH 0193/3949] increasea the loglevel for watchtower Signed-off-by: Simon L --- Containers/watchtower/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/watchtower/start.sh b/Containers/watchtower/start.sh index 1f6e3097..2c7a1835 100644 --- a/Containers/watchtower/start.sh +++ b/Containers/watchtower/start.sh @@ -10,7 +10,7 @@ elif ! test -r /var/run/docker.sock; then fi if [ -n "$CONTAINER_TO_UPDATE" ]; then - exec /watchtower --cleanup --run-once "$CONTAINER_TO_UPDATE" + exec /watchtower --cleanup --debug --run-once "$CONTAINER_TO_UPDATE" else echo "'CONTAINER_TO_UPDATE' is not set. Cannot update anything." exit 1 From fe251a9996367847c5a44a3e9ae8e02baf559826 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 1 Dec 2022 16:29:23 +0100 Subject: [PATCH 0194/3949] add a hint what to do if the backup container was forcefully killed Signed-off-by: Simon L --- Containers/postgresql/start.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh index b2e25a1b..fae1cce4 100644 --- a/Containers/postgresql/start.sh +++ b/Containers/postgresql/start.sh @@ -9,6 +9,8 @@ export PGPASSWORD="$POSTGRES_PASSWORD" # Don't start database as long as backup is running while [ -f "$DUMP_DIR/backup-is-running" ]; do echo "Waiting for backup container to finish..." + echo "If this is incorrect because the backup container is not running anymore (because it was forcefully killed), you might delete the lock file which is by default stored here:" + echo "/var/lib/docker/volumes/nextcloud_aio_database_dump/_data/backup-is-running" sleep 10 done From a3ed26063ccff293fff4c0d851f12673d55c66bd Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 2 Dec 2022 21:37:48 +0100 Subject: [PATCH 0195/3949] add hint regarding default borg.config path Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 2736edc5..d90f02a5 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -88,6 +88,7 @@ if [ "$BORG_MODE" = backup ]; then if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then echo "Cannot initialize a new repository as that was already done at least one time." echo "If you still want to do so, you may delete the 'borg.config' file that is stored in the mastercontainer volume manually, which will allow you to initialize a new borg repository in the chosen directory." + echo "By default it is stored here: /var/lib/docker/volumes/nextcloud_aio_mastercontainer/_data/data/borg.config" exit 1 fi From 87ac2607645539538521b0fc99d04b2ddd606b96 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 1 Dec 2022 18:26:23 +0100 Subject: [PATCH 0196/3949] add hint for not present appdata dir Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index d932b6b8..a04dad6d 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -209,6 +209,9 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then # unset admin password unset ADMIN_PASSWORD + # Post Install logs: For questions like https://help.nextcloud.com/t/nextcloud-aio-error-could-not-get-appdata-folder-after-container-has-already-written-data-in-it/151122/5 + echo "Install errors: $(cat /var/www/html/data/nextcloud.log)" + # Apply log settings echo "Applying default settings..." mkdir -p /var/www/html/data @@ -320,6 +323,9 @@ fi # If not, something broke (e.g. changing ncdatadir after aio was first started) if [ -z "$(find "$NEXTCLOUD_DATA_DIR/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ]; then echo "Appdata is not present. Did you maybe change the datadir after aio was first started?" + echo "See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir" + echo "In the datadir was found:" + ls -la "$NEXTCLOUD_DATA_DIR/" exit 1 fi From 638675906c7b19013c3173207261b84f18b0b8d3 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 2 Dec 2022 21:58:11 +0100 Subject: [PATCH 0197/3949] fix version number Signed-off-by: Simon L --- Containers/clamav/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/clamav/Dockerfile b/Containers/clamav/Dockerfile index 28b53e3b..518829ab 100644 --- a/Containers/clamav/Dockerfile +++ b/Containers/clamav/Dockerfile @@ -1,5 +1,5 @@ # Probably from this file: https://github.com/Cisco-Talos/clamav/blob/main/Dockerfile -FROM clamav/clamav:1.0.0 +FROM clamav/clamav:0.105.1-7 RUN apk add --update --no-cache tzdata COPY clamav.conf /tmp/ From 7f0f84ecfb63bcc785f2ed06cb36fd475e91ba8a Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Sat, 3 Dec 2022 04:21:26 +0000 Subject: [PATCH 0198/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index ca42d23c..55d4d585 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From d33f3f3b26bba3a62ac6fb3e8fcd13bad013cc0e Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 3 Dec 2022 16:05:38 +0100 Subject: [PATCH 0199/3949] fix the dependency-update workflow Signed-off-by: Simon L --- .github/workflows/dependency-updates.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml index bea58686..02536336 100644 --- a/.github/workflows/dependency-updates.yml +++ b/.github/workflows/dependency-updates.yml @@ -12,7 +12,8 @@ jobs: - uses: actions/checkout@v3 - uses: nanasess/setup-php@master with: - php-version: '8.0' + php-version: 8.0 + extensions: apcu - name: Run dependency update script run: | set -x From b86c1f490a0ca28b2fa80f376464a960b074fe46 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 1 Dec 2022 16:20:00 +0100 Subject: [PATCH 0200/3949] check if vfs or fuse-overlayfs is used Signed-off-by: Simon L --- Containers/mastercontainer/start.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index 7c0276de..eac30fb0 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -65,6 +65,17 @@ else sleep 10 fi +# Check Storage drivers +STORAGE_DRIVER="$(docker info | grep "Storage Driver")" +# Check if vfs is used: https://github.com/nextcloud/all-in-one/discussions/1467 +if echo "$STORAGE_DRIVER" | grep -q vfs; then + echo "$STORAGE_DRIVER" + echo "Warning: It seems like the storage driver vfs is used. This will lead to problems with disk space and performance and is disrecommended!" +elif echo "$STORAGE_DRIVER" | grep -q fuse-overlayfs; then + echo "$STORAGE_DRIVER" + echo "Warning: It seems like the storage driver fuse-overlayfs is used. Please check if you can switch to overlay2 instead." +fi + # Check if startup command was executed correctly if ! sudo -u www-data docker ps | grep -q "nextcloud-aio-mastercontainer"; then echo "It seems like you did not give the mastercontainer the correct name? From bc77beced49a65cdf1a57f42823e6bf494f0c6cb Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 5 Dec 2022 10:19:55 +0100 Subject: [PATCH 0201/3949] re-activate error.log for php-fpm Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 3 ++- Containers/nextcloud/supervisord.conf | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index bdd8574a..200851bf 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -209,7 +209,8 @@ RUN set -ex; \ sed -i 's/^pm.max_children =.*/pm.max_children = 80/' /usr/local/etc/php-fpm.d/www.conf; \ sed -i 's/^pm.start_servers =.*/pm.start_servers = 2/' /usr/local/etc/php-fpm.d/www.conf; \ sed -i 's/^pm.min_spare_servers =.*/pm.min_spare_servers = 1/' /usr/local/etc/php-fpm.d/www.conf; \ - sed -i 's/^pm.max_spare_servers =.*/pm.max_spare_servers = 3/' /usr/local/etc/php-fpm.d/www.conf + sed -i 's/^pm.max_spare_servers =.*/pm.max_spare_servers = 3/' /usr/local/etc/php-fpm.d/www.conf; \ + sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf RUN set -ex; \ rm -rf /tmp/nextcloud-aio && \ diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf index d6476d44..e54d13c0 100644 --- a/Containers/nextcloud/supervisord.conf +++ b/Containers/nextcloud/supervisord.conf @@ -12,8 +12,8 @@ user=root [program:php-fpm] stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 -# stderr_logfile=/dev/stderr -# stderr_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 command=php-fpm user=root From 38f9cb2046eb66bdc987b7b3c33ac3c59b9462b8 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 5 Dec 2022 10:34:33 +0100 Subject: [PATCH 0202/3949] fix the dependency update workflow? Signed-off-by: Simon L --- .github/workflows/dependency-updates.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml index 02536336..9e0af73e 100644 --- a/.github/workflows/dependency-updates.yml +++ b/.github/workflows/dependency-updates.yml @@ -1,13 +1,14 @@ name: dependency-updates on: + workflow_dispatch: schedule: - cron: '00 12 * * *' jobs: dependency_updates: name: Run dependency update script - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - uses: nanasess/setup-php@master From 94a508d8aa10f50bf01643bcea97cf65f1300b56 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 5 Dec 2022 10:54:34 +0100 Subject: [PATCH 0203/3949] Print apache errors in the future to stderr Signed-off-by: Simon L --- Containers/apache/nextcloud.conf | 4 ++-- Containers/apache/supervisord.conf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index 7a0b46b2..e4523c14 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -3,8 +3,8 @@ Listen 8000 ServerName localhost # Add error log - CustomLog ${APACHE_LOG_DIR}/access.log combined - ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog /proc/self/fd/1 combined + ErrorLog /proc/self/fd/2 # PHP match diff --git a/Containers/apache/supervisord.conf b/Containers/apache/supervisord.conf index 90436e05..c8245619 100644 --- a/Containers/apache/supervisord.conf +++ b/Containers/apache/supervisord.conf @@ -9,8 +9,8 @@ logfile_backups=10 loglevel=error [program:apache] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 +# stdout_logfile=/dev/stdout +# stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 command=apachectl -DFOREGROUND From a0cbcc7f52c0232e1bb1c47797f3283d1c71d6aa Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 5 Dec 2022 10:58:04 +0100 Subject: [PATCH 0204/3949] file logging is not needed Signed-off-by: Simon L --- Containers/mastercontainer/mastercontainer.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/Containers/mastercontainer/mastercontainer.conf b/Containers/mastercontainer/mastercontainer.conf index b343af32..fbde2b94 100644 --- a/Containers/mastercontainer/mastercontainer.conf +++ b/Containers/mastercontainer/mastercontainer.conf @@ -1,9 +1,6 @@ Listen 8000 Listen 8080 -CustomLog ${APACHE_LOG_DIR}/access.log combined -ErrorLog ${APACHE_LOG_DIR}/error.log - # Deny access to .ht files Require all denied From a05a3c02a29f800a39042a9c621c3f085ff8b5cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:11:41 +0000 Subject: [PATCH 0205/3949] Bump dessant/lock-threads from 3 to 4 Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 3 to 4. - [Release notes](https://github.com/dessant/lock-threads/releases) - [Changelog](https://github.com/dessant/lock-threads/blob/master/CHANGELOG.md) - [Commits](https://github.com/dessant/lock-threads/compare/v3...v4) --- updated-dependencies: - dependency-name: dessant/lock-threads dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/lock-threads.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock-threads.yml b/.github/workflows/lock-threads.yml index dfb1ea24..56c48ce7 100644 --- a/.github/workflows/lock-threads.yml +++ b/.github/workflows/lock-threads.yml @@ -14,7 +14,7 @@ jobs: action: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v3 + - uses: dessant/lock-threads@v4 with: issue-inactive-days: '14' process-only: 'issues' From 3d94ae56c413196cae9682f89264ec6b25a5432d Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 5 Dec 2022 15:44:16 +0100 Subject: [PATCH 0206/3949] increase to 3.2.0 Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 83228add..33d9cf1b 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v3.1.0

+

Nextcloud AIO v3.2.0

{# Add 2nd tab warning #} From 16dadb8f4e2016b7865073c37513716b9e5a84f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:04:58 +0000 Subject: [PATCH 0207/3949] Bump debian in /Containers/apache Bumps debian from bullseye-20221114-slim to bullseye-20221205-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index 14442ff7..b20b01fe 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,7 +1,7 @@ # Caddy is a requirement FROM caddy:2.6.2-alpine as caddy -FROM debian:bullseye-20221114-slim +FROM debian:bullseye-20221205-slim RUN mkdir -p /mnt/data; \ chown www-data:www-data /mnt/data; From 914bc68eeacfc665f6305eca7f92b5db25055df6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:05:03 +0000 Subject: [PATCH 0208/3949] Bump debian in /Containers/borgbackup Bumps debian from bullseye-20221114-slim to bullseye-20221205-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/borgbackup/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index f3118ed6..8c6fe1e7 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-20221114-slim +FROM debian:bullseye-20221205-slim RUN set -ex; \ \ From 979f2e45fe867a34fcff044d33d57a18827e6076 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 8 Dec 2022 15:02:41 +0100 Subject: [PATCH 0209/3949] allow to update Nextcloud dependencies using workflow_dispatch Signed-off-by: Simon L --- .github/workflows/nextcloud-update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nextcloud-update.yml b/.github/workflows/nextcloud-update.yml index 674d81fd..bbe74f63 100644 --- a/.github/workflows/nextcloud-update.yml +++ b/.github/workflows/nextcloud-update.yml @@ -2,6 +2,7 @@ name: nextcloud-update on: + workflow_dispatch: schedule: - cron: '00 12 * * *' From 02ed48f0d592c417dd97843b5f2ef2663b40cbe8 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 8 Dec 2022 14:06:32 +0000 Subject: [PATCH 0210/3949] nextcloud-update automated change Signed-off-by: GitHub --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 200851bf..e6546349 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -104,7 +104,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 24.0.7 +ENV NEXTCLOUD_VERSION 24.0.8 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ From 7b4d0baa6c28164577606caced7af22362e81e05 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 9 Dec 2022 11:33:46 +0100 Subject: [PATCH 0211/3949] remove pdo_mysql Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 2884d025..c1c5905b 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -53,7 +53,6 @@ RUN set -ex; \ ldap \ opcache \ pcntl \ - pdo_mysql \ pdo_pgsql \ zip \ gmp \ From 211ce3c69b0391d5705bed53002756616852273b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Dec 2022 12:06:33 +0000 Subject: [PATCH 0212/3949] Bump ubuntu from focal-20221019 to focal-20221130 in /Containers/talk Bumps ubuntu from focal-20221019 to focal-20221130. --- updated-dependencies: - dependency-name: ubuntu dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/talk/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index d7b5e4dd..309f1bae 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20221019 +FROM ubuntu:focal-20221130 RUN set -ex; \ \ From af1612cda1345e3792bdc1fd3cad74ada56e60dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 12:14:04 +0000 Subject: [PATCH 0213/3949] Bump elasticsearch from 7.17.7 to 7.17.8 in /Containers/fulltextsearch Bumps elasticsearch from 7.17.7 to 7.17.8. --- updated-dependencies: - dependency-name: elasticsearch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/fulltextsearch/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/fulltextsearch/Dockerfile b/Containers/fulltextsearch/Dockerfile index 9569eb65..5855f000 100644 --- a/Containers/fulltextsearch/Dockerfile +++ b/Containers/fulltextsearch/Dockerfile @@ -1,5 +1,5 @@ # Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile -FROM elasticsearch:7.17.7 +FROM elasticsearch:7.17.8 RUN elasticsearch-plugin install --batch ingest-attachment From 85999c297cd34a31b17617c3d3f2acf0f6f3f0b6 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 12 Dec 2022 18:16:24 +0100 Subject: [PATCH 0214/3949] also back up the fulltextsearch volume Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 2 +- php/containers.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index d90f02a5..8d23eca9 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -66,7 +66,7 @@ if [ "$BORG_MODE" = backup ]; then # Test that nothing is empty for directory in "${VOLUME_DIRS[@]}"; do - if [ -z "$(ls -A "$directory")" ]; then + if [ -z "$(ls -A "$directory")" ] && [ "$directory" != "/nextcloud_aio_volumes/nextcloud_aio_elasticsearch" ]; then echo "$directory is empty which is not allowed." exit 1 fi diff --git a/php/containers.json b/php/containers.json index 9412ed63..b603fe09 100644 --- a/php/containers.json +++ b/php/containers.json @@ -290,6 +290,11 @@ "name": "%BORGBACKUP_HOST_LOCATION%", "location": "/mnt/borgbackup", "writeable": true + }, + { + "name": "nextcloud_aio_elasticsearch", + "location": "/nextcloud_aio_volumes/nextcloud_aio_elasticsearch", + "writeable": true } ], "secrets": [ From df9457bd915fb7aefda6d7b820f56716ecf979d2 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 13 Dec 2022 00:33:57 +0100 Subject: [PATCH 0215/3949] manual-install - remove container_name so that it should run using docker-swarm too Signed-off-by: Simon L --- manual-install/update-yaml.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 6981ad6e..3cf0eed6 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -101,6 +101,8 @@ echo "" >> containers.yml echo "$OUTPUT" >> containers.yml +sed -i '/container_name/d' containers.yml + VOLUMES="$(grep -oP 'nextcloud_aio_[a-z_]+' containers.yml | sort -u)" mapfile -t VOLUMES <<< "$VOLUMES" echo "" >> containers.yml From d9f994fc5d41e715a09652db3a6804e4b5aed62b Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 13 Dec 2022 00:45:48 +0100 Subject: [PATCH 0216/3949] fix spaces in env file Signed-off-by: Simon L --- manual-install/update-yaml.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 6981ad6e..def0a763 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -59,7 +59,7 @@ done sed -i 's|_ENABLED=|_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically.|' sample.conf sed -i 's|TALK_ENABLED=no|TALK_ENABLED=yes|' sample.conf sed -i 's|COLLABORA_ENABLED=no|COLLABORA_ENABLED=yes|' sample.conf -sed -i 's|COLLABORA_DICTIONARIES=|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|' sample.conf +sed -i 's|COLLABORA_DICTIONARIES=|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|' sample.conf sed -i 's|NEXTCLOUD_DATADIR=|NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data # You can change this to e.g. "/mnt/ncdata" to map it to a location on your host. It needs to be adjusted before the first startup and never afterwards!|' sample.conf sed -i 's|NEXTCLOUD_MOUNT=|NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR!|' sample.conf sed -i 's|NEXTCLOUD_UPLOAD_LIMIT=|NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container|' sample.conf @@ -76,7 +76,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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time|' sample.conf +sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts apporder" # 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 sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf From aa32d496e618b358a3e3b5d99ddc3be961ae3c4b Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 13 Dec 2022 00:47:53 +0100 Subject: [PATCH 0217/3949] Update sample.conf Signed-off-by: Simon L --- manual-install/sample.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual-install/sample.conf b/manual-install/sample.conf index 54ae4aff..35e18307 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -3,7 +3,7 @@ AIO_URL=localhost # Has no function but needs to be set! APACHE_MAX_SIZE=10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy. CLAMAV_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. -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 +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 COLLABORA_ENABLED=yes # Setting this to "yes" enables the option in Nextcloud automatically. COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container. DATABASE_PASSWORD= # TODO! This needs to be a unique and good password! @@ -18,7 +18,7 @@ NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit o NEXTCLOUD_MEMORY_LIMIT=512M # This allows to change the PHP memory limit of the Nextcloud container NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR! NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin". -NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time +NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts apporder" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory. NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container ONLYOFFICE_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. From 7cf9fe8decf2fc861d1e4674abda049eedd883ad Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Tue, 13 Dec 2022 04:22:52 +0000 Subject: [PATCH 0218/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index 55d4d585..ec5b3e27 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From f9290e49c88f97dfab47efe39916c796b2d2252f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Dec 2022 12:04:55 +0000 Subject: [PATCH 0219/3949] Bump redis from 6.2.7-alpine to 6.2.8-alpine in /Containers/redis Bumps redis from 6.2.7-alpine to 6.2.8-alpine. --- updated-dependencies: - dependency-name: redis dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/redis/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/redis/Dockerfile b/Containers/redis/Dockerfile index 620f3739..41081bff 100644 --- a/Containers/redis/Dockerfile +++ b/Containers/redis/Dockerfile @@ -1,5 +1,5 @@ # From https://github.com/docker-library/redis/blob/master/6.2/alpine/Dockerfile -FROM redis:6.2.7-alpine +FROM redis:6.2.8-alpine RUN apk add --update --no-cache openssl bash From ab5369023bdcedb8764d02a396ea66e0ca0368fe Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 9 Dec 2022 11:29:32 +0100 Subject: [PATCH 0220/3949] update to Nextcloud 25 Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 2 +- app/appinfo/info.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 2884d025..93127e04 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -104,7 +104,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 24.0.8 +ENV NEXTCLOUD_VERSION 25.0.2 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ diff --git a/app/appinfo/info.xml b/app/appinfo/info.xml index 1f9c05c8..69cfa58d 100644 --- a/app/appinfo/info.xml +++ b/app/appinfo/info.xml @@ -5,7 +5,7 @@ Nextcloud All In One Provides a login link for admins. Add a link to the admin settings that gives access to the Nextcloud All In One admin interface - 0.2.0 + 0.3.0 agpl Azul AllInOne @@ -13,7 +13,7 @@ monitoring https://github.com/nextcloud/all-in-one/issues - + From bea8ca86dd54c432b15f3610adae58b338ed5254 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 9 Dec 2022 11:43:50 +0100 Subject: [PATCH 0221/3949] add a volume for collabora fonts Signed-off-by: Simon L --- php/containers.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php/containers.json b/php/containers.json index 9412ed63..e1d5dfe5 100644 --- a/php/containers.json +++ b/php/containers.json @@ -201,7 +201,13 @@ "dictionaries=%COLLABORA_DICTIONARIES%", "TZ=%TIMEZONE%" ], - "volumes": [], + "volumes": [ + { + "name": "nextcloud_aio_collabora_fonts", + "location": "/opt/cool/systemplate/tmpfonts", + "writeable": true + } + ], "secrets": [], "maxShutdownTime": 10, "restartPolicy": "unless-stopped" From 52b8bf06965d6ad27e37dc14a6fec9ce85d2877e Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 9 Dec 2022 12:42:15 +0100 Subject: [PATCH 0222/3949] make collabora more safe Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 7ff28ee2..55d98659 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -400,6 +400,44 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then php /var/www/html/occ config:app:set richdocuments wopi_url --value="https://$NC_DOMAIN/" # Fix https://github.com/nextcloud/all-in-one/issues/188: php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool --value=true + # Make collabora more save + COLLABORA_IPv4_ADDRESS="$(echo " Date: Tue, 13 Dec 2022 15:06:47 +0100 Subject: [PATCH 0223/3949] add exception for elasticsearch and re-order the exceptions Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 8d23eca9..bacfa1b5 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -258,13 +258,14 @@ if [ "$BORG_MODE" = restore ]; then # Restore everything except the configuration file if ! rsync --stats --archive --human-readable -vv --delete \ - --exclude "nextcloud_aio_mastercontainer/session/"** \ + --exclude "nextcloud_aio_apache/caddy/"** \ + --exclude "nextcloud_aio_elasticsearch" \ + --exclude "nextcloud_aio_mastercontainer/caddy/"** \ --exclude "nextcloud_aio_mastercontainer/certs/"** \ + --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \ --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \ - --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ - --exclude "nextcloud_aio_apache/caddy/"** \ - --exclude "nextcloud_aio_mastercontainer/caddy/"** \ + --exclude "nextcloud_aio_mastercontainer/session/"** \ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring from backup." umount /tmp/borg From bd81c3133f7f64796f6728b6c458e092adf88c6c Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 12 Dec 2022 19:50:13 +0100 Subject: [PATCH 0224/3949] also sync autoconfig files Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 7ff28ee2..63ec1d36 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -176,6 +176,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then rsync -rlD --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ fi done + rsync -rlD --delete -vv --include '/config/' --exclude '/*' --exclude '/config/CAN_INSTALL' --exclude '/config/config.sample.php' --exclude '/config/config.php' /usr/src/nextcloud/ /var/www/html/ rsync -rlD --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ echo "Initializing finished" From e5ca49356c4235139f820d8d35ef4437e256cf1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 12:06:35 +0000 Subject: [PATCH 0225/3949] Bump cirrus-actions/rebase from 1.7 to 1.8 Bumps [cirrus-actions/rebase](https://github.com/cirrus-actions/rebase) from 1.7 to 1.8. - [Release notes](https://github.com/cirrus-actions/rebase/releases) - [Commits](https://github.com/cirrus-actions/rebase/compare/1.7...1.8) --- updated-dependencies: - dependency-name: cirrus-actions/rebase dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/command-rebase.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml index 2279065b..4df2ab24 100644 --- a/.github/workflows/command-rebase.yml +++ b/.github/workflows/command-rebase.yml @@ -37,7 +37,7 @@ jobs: token: ${{ secrets.COMMAND_BOT_PAT }} - name: Automatic Rebase - uses: cirrus-actions/rebase@1.7 + uses: cirrus-actions/rebase@1.8 env: GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} From 6b3be9d6e83baa3cc9056af185f65fbac509e286 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 21 Nov 2022 16:44:51 +0100 Subject: [PATCH 0226/3949] remove the apporder app Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 9 +++++++-- docker-compose.yml | 2 +- manual-install/sample.conf | 2 +- manual-install/update-yaml.sh | 2 +- php/src/Data/ConfigurationManager.php | 2 +- readme.md | 2 +- tests/QA/060-environmental-variables.md | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 63ec1d36..d516138f 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -281,8 +281,13 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then if [ "${APPSTORAGE[$app]}" != "no" ]; then echo "Enabling $app..." if ! php /var/www/html/occ app:enable "$app" >/dev/null; then - echo "$app could not get enabled. Probably because it is not compatible with the new Nextcloud version." - bash /notify.sh "Could not enable the $app after the Nextcloud update!" "Feel free to look at the Nextcloud update logs and force-enable the app again from the app-store UI." + echo "The $app app could not get enabled. Probably because it is not compatible with the new Nextcloud version." + if [ "$app" = apporder ]; then + CUSTOM_HINT="The apporder app was deprecated. A possible replacement is the side_menu app, aka 'Custom menu'." + else + CUSTOM_HINT="Most likely because it is not compatible with the new Nextcloud version." + fi + bash /notify.sh "Could not enable the $app app after the Nextcloud update!" "$CUSTOM_HINT Feel free to look at the Nextcloud update logs and force-enable the app again from the app-store UI." continue fi # Only restore the group settings, if the app was enabled (and is thus compatible with the new NC version) diff --git a/docker-compose.yml b/docker-compose.yml index b118e11a..56255140 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - NEXTCLOUD_MEMORY_LIMIT=512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts apporder # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup + # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup # - 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. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container # - TALK_PORT=3478 # This allows to adjust the port that the talk container is using. diff --git a/manual-install/sample.conf b/manual-install/sample.conf index 35e18307..ae1ed7d0 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -18,7 +18,7 @@ NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit o NEXTCLOUD_MEMORY_LIMIT=512M # This allows to change the PHP memory limit of the Nextcloud container NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR! NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin". -NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts apporder" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time +NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory. NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container ONLYOFFICE_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 5450a788..b9fb1373 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -76,7 +76,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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts apporder" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time|' sample.conf +sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts" # 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 sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index a9b209e9..c389fa25 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -726,7 +726,7 @@ class ConfigurationManager if (is_string($apps)) { return trim($apps); } - return 'twofactor_totp deck tasks calendar contacts apporder'; + return 'twofactor_totp deck tasks calendar contacts'; } public function GetCollaboraDictionaries() : string { diff --git a/readme.md b/readme.md index 77ddb729..b6591d73 100644 --- a/readme.md +++ b/readme.md @@ -467,7 +467,7 @@ If you get an error during the domain validation which states that your ip-addre You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md) ### How to change the Nextcloud apps that are installed on the first startup? -You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts apporder"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. +You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. ### How to add packets permanently to the Nextcloud container? Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require external dependencies. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index 63a37502..6e4a088a 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -15,7 +15,7 @@ - [ ] When starting the mastercontainer with `-e NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. -- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `twofactor_totp deck tasks calendar contacts apporder`. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `twofactor_totp deck tasks calendar contacts`. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed and not imagemagick. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=inotify`, the resulting Nextcloud container should have the inotify extension installed and not the imagick extension. From d20cf5777f9f0d5869392781521298842cad2c9f Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 26 Nov 2022 14:43:21 +0100 Subject: [PATCH 0227/3949] remove the twofactor_totp app since it is bundled now Signed-off-by: Simon L --- docker-compose.yml | 2 +- php/src/Data/ConfigurationManager.php | 2 +- readme.md | 2 +- tests/QA/060-environmental-variables.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 56255140..e7e1bc02 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - NEXTCLOUD_MEMORY_LIMIT=512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - # - NEXTCLOUD_STARTUP_APPS=twofactor_totp deck tasks calendar contacts # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup + # - NEXTCLOUD_STARTUP_APPS=deck tasks calendar contacts # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup # - 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. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container # - TALK_PORT=3478 # This allows to adjust the port that the talk container is using. diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index c389fa25..9d21922e 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -726,7 +726,7 @@ class ConfigurationManager if (is_string($apps)) { return trim($apps); } - return 'twofactor_totp deck tasks calendar contacts'; + return 'deck tasks calendar contacts'; } public function GetCollaboraDictionaries() : string { diff --git a/readme.md b/readme.md index b6591d73..0c407a73 100644 --- a/readme.md +++ b/readme.md @@ -467,7 +467,7 @@ If you get an error during the domain validation which states that your ip-addre You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md) ### How to change the Nextcloud apps that are installed on the first startup? -You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="twofactor_totp deck tasks calendar contacts"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. +You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. ### How to add packets permanently to the Nextcloud container? Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require external dependencies. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index 6e4a088a..b0fca4f8 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -15,7 +15,7 @@ - [ ] When starting the mastercontainer with `-e NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. -- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `twofactor_totp deck tasks calendar contacts`. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `deck tasks calendar contacts`. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed and not imagemagick. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=inotify`, the resulting Nextcloud container should have the inotify extension installed and not the imagick extension. From 882fd3be26d177db2271922770f018b7ebfef725 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 9 Dec 2022 11:38:33 +0100 Subject: [PATCH 0228/3949] add a volume for redis Signed-off-by: Simon L --- php/containers.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php/containers.json b/php/containers.json index b603fe09..daed5d6f 100644 --- a/php/containers.json +++ b/php/containers.json @@ -178,7 +178,13 @@ "REDIS_HOST_PASSWORD=%REDIS_PASSWORD%", "TZ=%TIMEZONE%" ], - "volumes": [], + "volumes": [ + { + "name": "nextcloud_aio_redis", + "location": "/data", + "writeable": true + } + ], "secrets": [ "REDIS_PASSWORD", "ONLYOFFICE_SECRET" From 79946a876c3a1018110d7e2fa4a574b435e8198a Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 13 Dec 2022 14:32:38 +0100 Subject: [PATCH 0229/3949] remove the redis database once a backup gets restored Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 3 +++ php/containers.json | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index bacfa1b5..7640d441 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -337,6 +337,9 @@ if [ "$BORG_MODE" = restore ]; then # Add file to Nextcloud container so that it performs a fingerprint update the next time touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update" chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update" + + # Delete redis cache + rm -f "/mnt/redis/dump.rdb" fi # Do the Backup check diff --git a/php/containers.json b/php/containers.json index daed5d6f..76247dd3 100644 --- a/php/containers.json +++ b/php/containers.json @@ -301,6 +301,11 @@ "name": "nextcloud_aio_elasticsearch", "location": "/nextcloud_aio_volumes/nextcloud_aio_elasticsearch", "writeable": true + }, + { + "name": "nextcloud_aio_redis", + "location": "/mnt/redis", + "writeable": true } ], "secrets": [ From 71231b9b8bf349656fa0cdbd13b48bc5b6766884 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 15 Dec 2022 12:20:04 +0100 Subject: [PATCH 0230/3949] increase to 4.0.0 Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 33d9cf1b..c31d2f1b 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v3.2.0

+

Nextcloud AIO v4.0.0

{# Add 2nd tab warning #} From fb6668755cbcb93b447a99b48a05aadb686c8c0d Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 15 Dec 2022 14:32:03 +0100 Subject: [PATCH 0231/3949] make rsync less verbose Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index d516138f..37abacc2 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -176,7 +176,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then rsync -rlD --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ fi done - rsync -rlD --delete -vv --include '/config/' --exclude '/*' --exclude '/config/CAN_INSTALL' --exclude '/config/config.sample.php' --exclude '/config/config.php' /usr/src/nextcloud/ /var/www/html/ + rsync -rlD --delete --include '/config/' --exclude '/*' --exclude '/config/CAN_INSTALL' --exclude '/config/config.sample.php' --exclude '/config/config.php' /usr/src/nextcloud/ /var/www/html/ rsync -rlD --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ echo "Initializing finished" From 9b3ad327646a852e8cbe152a7e9b8d9d988e9bf1 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 15 Dec 2022 15:09:39 +0100 Subject: [PATCH 0232/3949] fix restoring of elasticsearch volume Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 7640d441..397cf700 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -259,7 +259,8 @@ if [ "$BORG_MODE" = restore ]; then # Restore everything except the configuration file if ! rsync --stats --archive --human-readable -vv --delete \ --exclude "nextcloud_aio_apache/caddy/"** \ - --exclude "nextcloud_aio_elasticsearch" \ + --exclude "nextcloud_aio_elasticsearch/" \ + --include "nextcloud_aio_elasticsearch/"** \ --exclude "nextcloud_aio_mastercontainer/caddy/"** \ --exclude "nextcloud_aio_mastercontainer/certs/"** \ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ From 0b961c9dfc6c7f90f75c3ade89ec30e8492063f9 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 16 Dec 2022 10:36:13 +0100 Subject: [PATCH 0233/3949] try - catch is not needed for onlyoffice js Signed-off-by: Simon L --- php/public/disable-onlyoffice.js | 6 ++---- php/public/options-form-submit.js | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/php/public/disable-onlyoffice.js b/php/public/disable-onlyoffice.js index b4d30dec..f9c7eebc 100644 --- a/php/public/disable-onlyoffice.js +++ b/php/public/disable-onlyoffice.js @@ -1,9 +1,7 @@ document.addEventListener("DOMContentLoaded", function(event) { // OnlyOffice - try { - var onlyoffice = document.getElementById("onlyoffice"); + var onlyoffice = document.getElementById("onlyoffice"); + if (onlyoffice) { onlyoffice.disabled = true; - } catch (error) { - // console.error(error); } }); \ No newline at end of file diff --git a/php/public/options-form-submit.js b/php/public/options-form-submit.js index e602f177..6d017315 100644 --- a/php/public/options-form-submit.js +++ b/php/public/options-form-submit.js @@ -13,11 +13,9 @@ document.addEventListener("DOMContentLoaded", function(event) { clamav.addEventListener('change', makeOptionsFormSubmitVisible); // OnlyOffice - try { - var onlyoffice = document.getElementById("onlyoffice"); + var onlyoffice = document.getElementById("onlyoffice"); + if (onlyoffice) { onlyoffice.addEventListener('change', makeOptionsFormSubmitVisible); - } catch (error) { - // console.error(error); } // Collabora From e18f8308ed410d354d6f6e1aa793ecfbe92b8165 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 16 Dec 2022 10:57:42 +0100 Subject: [PATCH 0234/3949] Don't start the Nextcloud container if the installation failed Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 37abacc2..aa3fea26 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -79,6 +79,14 @@ if [ -f "$NEXTCLOUD_DATA_DIR/update.failed" ]; then exit 1 fi +# Do not start the container if the install failed +if [ -f "$NEXTCLOUD_DATA_DIR/install.failed" ]; then + echo "The initial Nextcloud installation failed." + echo "Please reset AIO properly and try again. For further clues what went wrong, check the logs above." + echo "See https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance" + exit 1 +fi + # Skip any update if Nextcloud was just restored if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then if version_greater "$image_version" "$installed_version"; then @@ -203,6 +211,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then done if [ "$try" -gt "$max_retries" ]; then echo "installing of nextcloud failed!" + touch "$NEXTCLOUD_DATA_DIR/install.failed" exit 1 fi From 08aa2eece3b22e9363e2325975238610b15a3617 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 16 Dec 2022 12:36:51 +0100 Subject: [PATCH 0235/3949] fix Clamav starting trap Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 8 +++++++- php/templates/containers.twig | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 37abacc2..ac1c285e 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -463,10 +463,16 @@ fi # Clamav if [ "$CLAMAV_ENABLED" = 'yes' ]; then - while ! nc -z "$CLAMAV_HOST" 3310; do + CLAMAV_COUNT=0 + while ! nc -z "$CLAMAV_HOST" 3310 && [ "$CLAMAV_COUNT" -lt 90 ]; do echo "waiting for clamav to become available..." + CLAMAV_COUNT=$((CLAMAV_COUNT + 5)) sleep 5 done + if [ "$CLAMAV_COUNT" -ge 90 ]; then + echo "Error: ClamAV was not reachable within 90s." + exit 1 + fi if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then php /var/www/html/occ app:install files_antivirus elif [ "$(php /var/www/html/occ config:app:get files_antivirus enabled)" = "no" ]; then diff --git a/php/templates/containers.twig b/php/templates/containers.twig index c31d2f1b..0f642d33 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -562,7 +562,7 @@ {% endif %} {% endif %} - {% if isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true %} + {% if isAnyRestarting == false and (isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true) %} {% else %} From b90226282a742d2d9b086a808429f8f4aae2a6e1 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 16 Dec 2022 10:48:39 +0100 Subject: [PATCH 0236/3949] add stdbuf Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 2dbb9614..ee73e968 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -198,6 +198,7 @@ RUN set -ex; \ mawk \ sudo \ grep \ + coreutils \ ; \ rm -rf /var/lib/apt/lists/* From 1bd3c2cb4c569f99db4e12cc159dbc731a95e795 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 16 Dec 2022 18:12:03 +0100 Subject: [PATCH 0237/3949] add a further hint Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index ac1c285e..c9ae6884 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -470,7 +470,7 @@ if [ "$CLAMAV_ENABLED" = 'yes' ]; then sleep 5 done if [ "$CLAMAV_COUNT" -ge 90 ]; then - echo "Error: ClamAV was not reachable within 90s." + echo "Error: ClamAV was not reachable within 90s. Most likely is your RAM not big enough to let it start correctly." exit 1 fi if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then From 3c40abbb60b69663fd107910a011c9194d607249 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 10 Dec 2022 18:00:33 +0100 Subject: [PATCH 0238/3949] make more clear what to do when borg check fails Signed-off-by: Simon L --- php/templates/containers.twig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 33d9cf1b..d95e150f 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -111,7 +111,7 @@ {% if borg_backup_mode == 'test' %} Please adjust the path and/or the password in order to make it work!

{% elseif borg_backup_mode == 'check' %} - The backup archive seems to be corrupt. Please try to use a different intact backup archive or try to fix it by following this documentation + The backup archive seems to be corrupt. Please try to use a different intact backup archive or try to fix it by following this documentation {% endif %} {% elseif backup_exit_code == 0 %} Last {{ borg_backup_mode }} successful! (Logs)

@@ -328,6 +328,9 @@

Backup and restore

{% if backup_exit_code > 0 %} Last {{ borg_backup_mode }} failed! (Logs)

+ {% if borg_backup_mode == "check" %} + The backup archive seems to be corrupt. You can try to fix it by following this documentation

+ {% endif %} {% if has_backup_run_once == false %} You may change the backup path again since the initial backup was not successful. After submitting the new value, you need to click on 'Create Backup' for testing the new value.

From 1dee9c465c89d4f811e68667bad297561de19017 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 12:33:24 +0100 Subject: [PATCH 0239/3949] reload in case of undefined response Signed-off-by: Simon L --- php/public/forms.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/php/public/forms.js b/php/public/forms.js index 4202f31e..029dfd5d 100644 --- a/php/public/forms.js +++ b/php/public/forms.js @@ -19,12 +19,13 @@ const xhr = e.target; if (xhr.status === 201) { window.location.replace(xhr.getResponseHeader('Location')); - } - if (xhr.status === 422) { + } else if (xhr.status === 422) { showError(xhr.response); - } - if (xhr.status === 500) { - showError("Server error. Please see the logs for details."); + } else if (xhr.status === 500) { + showError("Server error. Please check the mastercontainer logs for details."); + } else { + // If the responose is not one of the above, we should reload to show the latest content + window.location.reload(1); } } From 3f775653a017b289ccd1cedbdc56053ec6b7f019 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 15:30:45 +0100 Subject: [PATCH 0240/3949] Revert "fix Clamav starting trap" Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 8 +------- php/templates/containers.twig | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 81d0c697..aa3fea26 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -472,16 +472,10 @@ fi # Clamav if [ "$CLAMAV_ENABLED" = 'yes' ]; then - CLAMAV_COUNT=0 - while ! nc -z "$CLAMAV_HOST" 3310 && [ "$CLAMAV_COUNT" -lt 90 ]; do + while ! nc -z "$CLAMAV_HOST" 3310; do echo "waiting for clamav to become available..." - CLAMAV_COUNT=$((CLAMAV_COUNT + 5)) sleep 5 done - if [ "$CLAMAV_COUNT" -ge 90 ]; then - echo "Error: ClamAV was not reachable within 90s. Most likely is your RAM not big enough to let it start correctly." - exit 1 - fi if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then php /var/www/html/occ app:install files_antivirus elif [ "$(php /var/www/html/occ config:app:get files_antivirus enabled)" = "no" ]; then diff --git a/php/templates/containers.twig b/php/templates/containers.twig index e41d0fcb..fa2f303d 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -565,7 +565,7 @@ {% endif %} {% endif %} - {% if isAnyRestarting == false and (isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true) %} + {% if isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true %} {% else %} From f4944fbf92d5c2274eb28fa8d34d72a60e9b8266 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 15:33:28 +0100 Subject: [PATCH 0241/3949] change clamd startup timeout to 90s Signed-off-by: Simon L --- php/containers.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php/containers.json b/php/containers.json index b757478c..77bbcb76 100644 --- a/php/containers.json +++ b/php/containers.json @@ -371,7 +371,8 @@ "3310" ], "environmentVariables": [ - "TZ=%TIMEZONE%" + "TZ=%TIMEZONE%", + "CLAMD_STARTUP_TIMEOUT=90" ], "volumes": [ { From 331442fe388035e986e8b8efb8732cf185062cdb Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 15:43:34 +0100 Subject: [PATCH 0242/3949] add two more points to manual-install Signed-off-by: Simon L --- manual-install/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manual-install/readme.md b/manual-install/readme.md index 24efebca..da98efa8 100644 --- a/manual-install/readme.md +++ b/manual-install/readme.md @@ -5,12 +5,14 @@ You can run the containers that are build for AIO with docker-compose. This come ### Advantages - You can run it without a container having access to the docker socket - You can modify all values on your own +- You can run the containers with docker swarm ### Disadvantages - You lose the AIO interface - You lose update notifications and automatic updates - You lose all AIO backup and restore features - You need to know what you are doing, especially when modifying the docker-compose file +- For updating, you need to strictly follow the at the bottom described update routine - Probably more ## How to use this? From e389a17a7441fb3145e1ec83c0af4d85542f2c66 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 16:03:03 +0100 Subject: [PATCH 0243/3949] try to fix the elasticsearch inclusion Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 397cf700..7f185b8a 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -259,8 +259,8 @@ if [ "$BORG_MODE" = restore ]; then # Restore everything except the configuration file if ! rsync --stats --archive --human-readable -vv --delete \ --exclude "nextcloud_aio_apache/caddy/"** \ - --exclude "nextcloud_aio_elasticsearch/" \ --include "nextcloud_aio_elasticsearch/"** \ + --exclude "nextcloud_aio_elasticsearch/" \ --exclude "nextcloud_aio_mastercontainer/caddy/"** \ --exclude "nextcloud_aio_mastercontainer/certs/"** \ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ From 70b87ed9f89148bdb304a50f28033d874e067a91 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 16:14:11 +0100 Subject: [PATCH 0244/3949] try to fix it Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 7f185b8a..30c09a64 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -260,7 +260,7 @@ if [ "$BORG_MODE" = restore ]; then if ! rsync --stats --archive --human-readable -vv --delete \ --exclude "nextcloud_aio_apache/caddy/"** \ --include "nextcloud_aio_elasticsearch/"** \ - --exclude "nextcloud_aio_elasticsearch/" \ + --exclude "nextcloud_aio_elasticsearch" \ --exclude "nextcloud_aio_mastercontainer/caddy/"** \ --exclude "nextcloud_aio_mastercontainer/certs/"** \ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ From de01850279e06605c7bb46934c4529ccb08dc992 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 16:20:58 +0100 Subject: [PATCH 0245/3949] another attempt Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 30c09a64..9710dd4f 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -259,8 +259,6 @@ if [ "$BORG_MODE" = restore ]; then # Restore everything except the configuration file if ! rsync --stats --archive --human-readable -vv --delete \ --exclude "nextcloud_aio_apache/caddy/"** \ - --include "nextcloud_aio_elasticsearch/"** \ - --exclude "nextcloud_aio_elasticsearch" \ --exclude "nextcloud_aio_mastercontainer/caddy/"** \ --exclude "nextcloud_aio_mastercontainer/certs/"** \ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \ From 4ab3520d10915673b70cce448c5f47240b170ea9 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 16:38:58 +0100 Subject: [PATCH 0246/3949] another one Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 9710dd4f..c115d024 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -265,6 +265,7 @@ if [ "$BORG_MODE" = restore ]; then --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \ --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \ --exclude "nextcloud_aio_mastercontainer/session/"** \ + --filter='protect /nextcloud_aio_elasticsearch/' \ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring from backup." umount /tmp/borg From 756511f16afaac36f0d78d80891ec81c656878fa Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 17 Dec 2022 16:46:11 +0100 Subject: [PATCH 0247/3949] This does not work Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index c115d024..9710dd4f 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -265,7 +265,6 @@ if [ "$BORG_MODE" = restore ]; then --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \ --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \ --exclude "nextcloud_aio_mastercontainer/session/"** \ - --filter='protect /nextcloud_aio_elasticsearch/' \ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring from backup." umount /tmp/borg From 65b6d7e6b1497b6a02ba5bca482d3f5e4b0d878a Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 18 Dec 2022 15:02:26 +0100 Subject: [PATCH 0248/3949] make more clear which FS is recommended for docker Signed-off-by: Simon L --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 0c407a73..8014fb2d 100644 --- a/readme.md +++ b/readme.md @@ -488,7 +488,7 @@ The files and folders that you add to Nextcloud are by default stored in the fol After you are done modifying/adding/deleting files/folders, don't forget to apply the correct permissions by running: `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and `sudo chmod -R 750 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/*` and rescan the files with `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all`. ### How to store the files/installation on a separate drive? -You can move the whole docker library and all its files including all Nextcloud AIO files and folders to a separate drive by first mounting the drive in the host OS (NTFS is not supported) and then following this tutorial: https://www.guguweb.com/2019/02/07/how-to-move-docker-data-directory-to-another-location-on-ubuntu/
+You can move the whole docker library and all its files including all Nextcloud AIO files and folders to a separate drive by first mounting the drive in the host OS (NTFS is not supported and ext4 is recommended as FS) and then following this tutorial: https://www.guguweb.com/2019/02/07/how-to-move-docker-data-directory-to-another-location-on-ubuntu/
(Of course docker needs to be installed first for this to work.) ### How to edit Nextclouds config.php file with a texteditor? From 6a509513a34296c30d27ff1ec9a92944d016c43e Mon Sep 17 00:00:00 2001 From: thigg Date: Sun, 18 Dec 2022 18:17:43 +0100 Subject: [PATCH 0249/3949] Added cifs/smb config help to readme Signed-off-by: thigg --- readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/readme.md b/readme.md index 8014fb2d..cf00ebb4 100644 --- a/readme.md +++ b/readme.md @@ -432,6 +432,23 @@ You can configure the Nextcloud container to use a specific directory on your ho -o o="bind" ``` (The value `/host_mnt/c/your/data/path` in this example would be equivalent to `C:\your\data\path` on the Windows host. So you need to translate the path that you want to use into the correct format.) ⚠️️ **Attention**: Make sure that the path exists on the host before you create the volume! Otherwise everything will bug out! +⚠️️ **Attention**: Make sure the user www-data can access the folder. + +#### Can I use a CIFS/SMB share as Datadir? #### + +Sure. Add this to your `etc/fstab`: + +``` +//your-storage-host/subpath /mnt/storagebox cifs rw,credentials=/etc/storage-credentials.txt,uid=www-data,gid=0,file_mode=0770,dir_mode=0770 0 0 +``` + +and into `/etc/storage-credentials.txt`: +``` +username= +password= +``` + +Now you can use /mnt/storagebox as Datadir like described above ### How to allow the Nextcloud container to access directories on the host? By default, the Nextcloud container is confined and cannot access directories on the host OS. You might want to change this when you are planning to use local external storage in Nextcloud to store some files outside the data directory and can do so by adding the environmental variable `NEXTCLOUD_MOUNT` to the initial startup of the mastercontainer. Allowed values for that variable are strings that start with `/` and are not equal to `/`. From 42c7e86ee9a9c227e09e36a3ca9314e92af877c2 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Mon, 19 Dec 2022 04:22:03 +0000 Subject: [PATCH 0250/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index ec5b3e27..905eba46 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From f3bfc2beb73110231fd3f84b67c14203beaa7d0e Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 19 Dec 2022 14:04:19 +0100 Subject: [PATCH 0251/3949] a few improvements Signed-off-by: Simon L --- readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index cf00ebb4..3407bbdf 100644 --- a/readme.md +++ b/readme.md @@ -431,24 +431,24 @@ You can configure the Nextcloud container to use a specific directory on your ho -o type="none" ^ -o o="bind" ``` - (The value `/host_mnt/c/your/data/path` in this example would be equivalent to `C:\your\data\path` on the Windows host. So you need to translate the path that you want to use into the correct format.) ⚠️️ **Attention**: Make sure that the path exists on the host before you create the volume! Otherwise everything will bug out! -⚠️️ **Attention**: Make sure the user www-data can access the folder. +(The value `/host_mnt/c/your/data/path` in this example would be equivalent to `C:\your\data\path` on the Windows host. So you need to translate the path that you want to use into the correct format.) ⚠️️ **Attention**: Make sure that the path exists on the host before you create the volume! Otherwise everything will bug out! -#### Can I use a CIFS/SMB share as Datadir? #### +### Can I use a CIFS/SMB share as Nextcloud's datadir? -Sure. Add this to your `etc/fstab`: +Sure. Add this to the `/etc/fstab` file:
+` cifs rw,credentials=,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0`
+(Of course you need to modify ``, `` and `` for your specific case.) -``` -//your-storage-host/subpath /mnt/storagebox cifs rw,credentials=/etc/storage-credentials.txt,uid=www-data,gid=0,file_mode=0770,dir_mode=0770 0 0 -``` - -and into `/etc/storage-credentials.txt`: +One example could look like this:
+`//your-storage-host/subpath /mnt/storagebox cifs rw,credentials=/etc/storage-credentials,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0`
+and add into `/etc/storage-credentials`: ``` username= password= ``` +(Of course you need to modify `` and `` for your specific case.) -Now you can use /mnt/storagebox as Datadir like described above +Now you can use `/mnt/storagebox` as Nextcloud's datadir like described in the section above above this one. ### How to allow the Nextcloud container to access directories on the host? By default, the Nextcloud container is confined and cannot access directories on the host OS. You might want to change this when you are planning to use local external storage in Nextcloud to store some files outside the data directory and can do so by adding the environmental variable `NEXTCLOUD_MOUNT` to the initial startup of the mastercontainer. Allowed values for that variable are strings that start with `/` and are not equal to `/`. From 01ea8900ccb6c2a15f2d3f6477deaf226b176df6 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Tue, 20 Dec 2022 04:21:42 +0000 Subject: [PATCH 0252/3949] Update psalm baseline Signed-off-by: GitHub --- php/psalm-baseline.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index 905eba46..e62c34f0 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $args From e47b58312a9f5c58f9dcf4524e8f33b9004d12b3 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 20 Dec 2022 10:59:01 +0100 Subject: [PATCH 0253/3949] improve database import Signed-off-by: Simon L --- Containers/postgresql/start.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh index fae1cce4..f2be4fc0 100644 --- a/Containers/postgresql/start.sh +++ b/Containers/postgresql/start.sh @@ -20,6 +20,13 @@ if ! [ -w "$DUMP_DIR" ]; then exit 1 fi +# Don't start if import failed +if [ -f "$DUMP_DIR/import.failed" ]; then + echo "The database import failed. Please restore a backup and try again." + echo "For further clues on what went wrong, look at the logs above." + exit 1 +fi + # Delete the datadir once (needed for setting the correct credentials on old instances once) if ! [ -f "$DUMP_DIR/export.failed" ] && ! [ -f "$DUMP_DIR/initial-cleanup-done" ]; then set -ex @@ -48,6 +55,9 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO # Inform echo "Restoring from database dump." + # Add import.failed file + touch "$DUMP_DIR/import.failed" + # Exit if any command fails set -ex @@ -76,7 +86,12 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO # Get the Owner DB_OWNER="$(grep "$GREP_STRING" "$DUMP_FILE" | grep -oP 'Owner:.*$' | sed 's|Owner:||;s| ||g')" - if [ "$DB_OWNER" != "oc_$POSTGRES_USER" ]; then + if [ "$DB_OWNER" = "$POSTGRES_USER" ]; then + DIFFERENT_DB_OWNER=1 + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL + ALTER DATABASE "$POSTGRES_DB" OWNER TO "$POSTGRES_USER"; +EOSQL + elif [ "$DB_OWNER" != "oc_$POSTGRES_USER" ]; then DIFFERENT_DB_OWNER=1 psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL CREATE USER "$DB_OWNER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB; @@ -104,6 +119,9 @@ EOSQL # Don't exit if command fails anymore set +ex + + # Remove import failed file if everything went correctly + rm "$DUMP_DIR/import.failed" fi # Cover the last case From e70bc8c5f719e2a097a10421a0686027900eba34 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 20 Dec 2022 11:16:50 +0100 Subject: [PATCH 0254/3949] fix the turn:add syntax Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index aa3fea26..ed816975 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -455,7 +455,7 @@ if [ "$TALK_ENABLED" = 'yes' ]; then fi # Based on https://github.com/nextcloud/spreed/issues/960#issuecomment-416993435 if [ -z "$(php /var/www/html/occ talk:turn:list --output="plain")" ]; then - php /var/www/html/occ talk:turn:add "$NC_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET" + php /var/www/html/occ talk:turn:add turn "$NC_DOMAIN:$TALK_PORT" "udp,tcp" --secret="$TURN_SECRET" fi if php /var/www/html/occ talk:stun:list --output="plain" | grep -oP '[a-zA-Z.:0-9]+' | grep -q "^stun.nextcloud.com:443$"; then php /var/www/html/occ talk:stun:add "$NC_DOMAIN:$TALK_PORT" From 730d4e1bee68d4537919b1c4aae8e5e34ce320a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Dec 2022 12:06:41 +0000 Subject: [PATCH 0255/3949] Bump collabora/code in /Containers/collabora Bumps collabora/code from 22.05.8.4.1 to 22.05.9.2.1. --- updated-dependencies: - dependency-name: collabora/code dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/collabora/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 1a168ca6..5d7a6d40 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -1,5 +1,5 @@ # From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker -FROM collabora/code:22.05.8.4.1 +FROM collabora/code:22.05.9.2.1 USER root From edb616b18cb2c0a617fbc892e0837c44cb382b73 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 20 Dec 2022 17:07:43 +0100 Subject: [PATCH 0256/3949] add logging to database import Signed-off-by: Simon L --- Containers/postgresql/start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh index f2be4fc0..971bb6cc 100644 --- a/Containers/postgresql/start.sh +++ b/Containers/postgresql/start.sh @@ -52,6 +52,10 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO exit 1 fi + # Write output to logfile. + exec > >(tee -i "$DUMP_DIR/database-import.log") + exec 2>&1 + # Inform echo "Restoring from database dump." From 70a03ba1ae2c0b161165ceaf89930a100f9aae15 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 20 Dec 2022 23:54:30 +0100 Subject: [PATCH 0257/3949] add facerecognition notice to the readme Signed-off-by: Simon L --- readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.md b/readme.md index 3407bbdf..0e82ce4c 100644 --- a/readme.md +++ b/readme.md @@ -496,6 +496,9 @@ Some Nextcloud apps require additional php extensions that must be bundled withi You can do so by adding `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS="imagick extension1 extension2"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default added is `imagick`. If you want to keep that, you need to specify it as well. +### What about the pdlib PHP extension for the facerecognition app? +The [facerecognition app](https://apps.nextcloud.com/apps/facerecognition) requires the pdlib PHP extension to be installed. Unfortunately, it is not available on PECL nor via PHP core, so there is no way to add this into AIO currently. However you can vote up [this issue](https://github.com/goodspb/pdlib/issues/56) to bring it to PECL and there is the [recognize app](https://apps.nextcloud.com/apps/recognize) that also allows to do face-recognition. + ### Huge docker logs When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/ From 0239788c786905ec715edad21044760caf65350f Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 21 Dec 2022 11:22:19 +0100 Subject: [PATCH 0258/3949] make the turnserver more reliable Signed-off-by: Simon L --- Containers/talk/Dockerfile | 4 +++- Containers/talk/start.sh | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index 309f1bae..0e596cf0 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -53,11 +53,13 @@ RUN curl -sL -o "/usr/share/janus/lua/json.lua" "https://raw.githubusercontent.c RUN mkdir -p /etc/nats; \ echo "listen: 127.0.0.1:4222" > /etc/nats/nats.conf; \ + mkdir /var/lib/turn; \ chown talk:talk /etc; \ chown talk:talk -R /etc/nats; \ chown talk:talk -R /etc/janus; \ chown talk:talk -R /etc/signaling; \ - chown talk:talk -R /usr + chown talk:talk -R /usr; \ + chown talk:talk -R /var/lib/turn; # Give root a random password RUN echo "root:$(openssl rand -base64 12)" | chpasswd diff --git a/Containers/talk/start.sh b/Containers/talk/start.sh index d0a502be..3b7567af 100644 --- a/Containers/talk/start.sh +++ b/Containers/talk/start.sh @@ -15,7 +15,7 @@ elif [ -z "$SIGNALING_SECRET" ]; then exit 1 fi -# Turn +# Turn: https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf cat << TURN_CONF > "/etc/turnserver.conf" listening-port=$TALK_PORT fingerprint @@ -29,6 +29,9 @@ stale-nonce no-multicast-peers simple-log pidfile=/var/tmp/turnserver.pid +no-tls +no-dtls +userdb=/var/lib/turn/turndb TURN_CONF # Janus From a12b1c0e56050ca62957c3b9635e07451016b282 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Dec 2022 12:10:04 +0000 Subject: [PATCH 0259/3949] Bump debian in /Containers/borgbackup Bumps debian from bullseye-20221205-slim to bullseye-20221219-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/borgbackup/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile index 8c6fe1e7..a1e5c260 100644 --- a/Containers/borgbackup/Dockerfile +++ b/Containers/borgbackup/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-20221205-slim +FROM debian:bullseye-20221219-slim RUN set -ex; \ \ From f4f717c929014e220929c65bb1b1bc6b078de185 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Dec 2022 12:10:40 +0000 Subject: [PATCH 0260/3949] Bump debian in /Containers/apache Bumps debian from bullseye-20221205-slim to bullseye-20221219-slim. --- updated-dependencies: - dependency-name: debian dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index b20b01fe..dc32cb61 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -1,7 +1,7 @@ # Caddy is a requirement FROM caddy:2.6.2-alpine as caddy -FROM debian:bullseye-20221205-slim +FROM debian:bullseye-20221219-slim RUN mkdir -p /mnt/data; \ chown www-data:www-data /mnt/data; From 9184aab3ec0ff6c7f2ddfbc26753cbd93d977af8 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 21 Dec 2022 16:10:15 +0100 Subject: [PATCH 0261/3949] add gcompat for the recognize app Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index ee73e968..61df8d6f 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -199,6 +199,7 @@ RUN set -ex; \ sudo \ grep \ coreutils \ + gcompat \ ; \ rm -rf /var/lib/apt/lists/* From 5f68d556724f150cdd1e3b4c9a309b0232adb013 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 21 Dec 2022 23:19:19 +0100 Subject: [PATCH 0262/3949] update OO Signed-off-by: Simon L --- Containers/onlyoffice/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/onlyoffice/Dockerfile b/Containers/onlyoffice/Dockerfile index e71c8fae..9488d6fe 100644 --- a/Containers/onlyoffice/Dockerfile +++ b/Containers/onlyoffice/Dockerfile @@ -1,4 +1,4 @@ # From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile -FROM onlyoffice/documentserver:7.2.1.34 +FROM onlyoffice/documentserver:7.2.2.56 HEALTHCHECK CMD curl -skfI localhost || exit 1 \ No newline at end of file From 73e029ec237b5b3cdaaa4aa404a8309beb3e6672 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 22 Dec 2022 00:08:53 +0100 Subject: [PATCH 0263/3949] improve the reverse proxy documentation further Signed-off-by: Simon L --- reverse-proxy.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index f0089b63..5f201a6c 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -1,15 +1,16 @@ # Reverse Proxy Documentation -**Please note:** Publishing the AIO interface with a valid certificate to the public internet is **not** the goal of this documentation! Instead, the main goal is to publish Nextcloud with a valid certificate to the public internet which is **not** running inside the mastercontainer but in a different container! If you need a valid certificate for the AIO interface, see [point 4](#4-optional-get-a-valid-certificate-for-the-aio-interface). +**Please note:** Publishing the AIO interface with a valid certificate to the public internet is **not** the goal of this documentation! Instead, the main goal is to publish Nextcloud with a valid certificate to the public internet which is **not** running inside the mastercontainer but in a different container! If you need a valid certificate for the AIO interface, see [point 5](#5-optional-get-a-valid-certificate-for-the-aio-interface). In order to run Nextcloud behind a reverse proxy, you need to specify the port that the Apache container shall use, add a specific config to your reverse proxy and modify the startup command a bit. All examples below will use port `11000` as example Apache port which will be exposed on the host. Modify it to your needings. -**Attention** The process to run Nextcloud behind a reverse proxy consists of at least these 2 steps: +**Attention** The process to run Nextcloud behind a reverse proxy consists of at least steps 1, 2 and 4: 1. **Configure the reverse proxy! See [point 1](#1-add-this-to-your-reverse-proxy-config)** 1. **Use the in this document provided startup command! See [point 2](#2-use-this-startup-command)** -1. If the reverse proxy is installed on the same host, you should limit the apache container to only listen on localhost. See [point 3](#3-if-the-reverse-proxy-is-installed-on-the-same-host-you-should-configure-the-apache-container-to-only-listen-on-localhost) -- Optional: get a valid certificate for the AIO interface! See [point 4](#4-optional-get-a-valid-certificate-for-the-aio-interface) -- How to debug things? See [point 5](#5-how-to-debug-things) +1. Optional: If the reverse proxy is installed on the same host, you should limit the apache container to only listen on localhost. See [point 3](#3-if-the-reverse-proxy-is-installed-on-the-same-host-you-should-configure-the-apache-container-to-only-listen-on-localhost) +1. **Open the AIO interface. See [point 4](#4-open-the-aio-interface)** +1. Optional: get a valid certificate for the AIO interface! See [point 5](#5-optional-get-a-valid-certificate-for-the-aio-interface) +1. How to debug things? See [point 6](#6-how-to-debug-things) ## 1. Add this to your reverse proxy config @@ -471,16 +472,14 @@ nextcloud/all-in-one:latest Simply translate the docker run command into a docker-compose file. You can have a look at [this file](https://github.com/nextcloud/all-in-one/blob/main/docker-compose.yml) for some inspiration but you will need to modify it either way. You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588 ---- - -### How to continue? -After using the above command, you should be able to access the AIO Interface via `https://ip.address.of.the.host:8080`. Enter your domain that you've entered in the reverse proxy config and you should be done. Please do not forget to open port `3478/TCP` and `3478/UDP` in your firewall/router for the Talk container! - ## 3. If the reverse proxy is installed on the same host, you should configure the apache container to only listen on localhost. Use this envorinmental variable during the initial startup of the mastercontainer to make the apache container only listen on localhost: `-e APACHE_IP_BINDING=127.0.0.1`. **Attention:** This is only recommended to be set if you use `localhost` in your reverse proxy config to connect to your AIO instance. If you use an ip-address, you can either simply skip this step or set it to `0.0.0.0` if you are unsure what the correct value is. -## 4. Optional: get a valid certificate for the AIO interface +## 4. Open the AIO interface. +After starting AIO, you should be able to access the AIO Interface via `https://ip.address.of.the.host:8080`. Enter your domain that you've entered in the reverse proxy config and you should be done. Please do not forget to open port `3478/TCP` and `3478/UDP` in your firewall/router for the Talk container! + +## 5. Optional: get a valid certificate for the AIO interface If you want to also access your AIO interface publicly with a valid certificate, you can add e.g. the following config to your Caddyfile: @@ -498,7 +497,7 @@ Of course you need to modify `` to the domain on which you want Afterwards should the AIO interface be accessible via `https://ip.address.of.the.host:8443`. You can alternatively change the domain to a different subdomain by using `https://:443` instead of `https://:8443` in the Caddyfile and use that to access the AIO interface. -## 5. How to debug things? +## 6. How to debug things? If something does not work, follow the steps below: 1. Make sure to exactly follow the whole reverse proxy documentation step-for-step from top to bottom! 1. Make sure that the reverse proxy is running on the host OS or if running in a container, connected to the host network. If that is not possible, substitute `localhost` in the default configurations by the ip-address that you can easily get when running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (The command only works on Linux) From 1a7dbb4dab6d394e12ee78e20e731860ade283c8 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 22 Dec 2022 00:12:50 +0100 Subject: [PATCH 0264/3949] fix small detail Signed-off-by: Simon L --- reverse-proxy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 5f201a6c..c4011055 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -4,13 +4,13 @@ In order to run Nextcloud behind a reverse proxy, you need to specify the port that the Apache container shall use, add a specific config to your reverse proxy and modify the startup command a bit. All examples below will use port `11000` as example Apache port which will be exposed on the host. Modify it to your needings. -**Attention** The process to run Nextcloud behind a reverse proxy consists of at least steps 1, 2 and 4: +**Attention:** The process to run Nextcloud behind a reverse proxy consists of at least steps 1, 2 and 4: 1. **Configure the reverse proxy! See [point 1](#1-add-this-to-your-reverse-proxy-config)** 1. **Use the in this document provided startup command! See [point 2](#2-use-this-startup-command)** 1. Optional: If the reverse proxy is installed on the same host, you should limit the apache container to only listen on localhost. See [point 3](#3-if-the-reverse-proxy-is-installed-on-the-same-host-you-should-configure-the-apache-container-to-only-listen-on-localhost) 1. **Open the AIO interface. See [point 4](#4-open-the-aio-interface)** -1. Optional: get a valid certificate for the AIO interface! See [point 5](#5-optional-get-a-valid-certificate-for-the-aio-interface) -1. How to debug things? See [point 6](#6-how-to-debug-things) +1. Optional: Get a valid certificate for the AIO interface! See [point 5](#5-optional-get-a-valid-certificate-for-the-aio-interface) +1.Optional: How to debug things? See [point 6](#6-how-to-debug-things) ## 1. Add this to your reverse proxy config From 35b87eee9b4dd2d3940ac9a445353bfd3a1c39c6 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 22 Dec 2022 00:14:19 +0100 Subject: [PATCH 0265/3949] typo Signed-off-by: Simon L --- reverse-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index c4011055..c41193b0 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -10,7 +10,7 @@ In order to run Nextcloud behind a reverse proxy, you need to specify the port t 1. Optional: If the reverse proxy is installed on the same host, you should limit the apache container to only listen on localhost. See [point 3](#3-if-the-reverse-proxy-is-installed-on-the-same-host-you-should-configure-the-apache-container-to-only-listen-on-localhost) 1. **Open the AIO interface. See [point 4](#4-open-the-aio-interface)** 1. Optional: Get a valid certificate for the AIO interface! See [point 5](#5-optional-get-a-valid-certificate-for-the-aio-interface) -1.Optional: How to debug things? See [point 6](#6-how-to-debug-things) +1. Optional: How to debug things? See [point 6](#6-how-to-debug-things) ## 1. Add this to your reverse proxy config From 2ddd9406aa8ebb509ca6b112c7e7b42bacd8375e Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 22 Dec 2022 01:02:08 +0100 Subject: [PATCH 0266/3949] the files_lock app should get installed by default as well Signed-off-by: Simon L --- docker-compose.yml | 2 +- manual-install/sample.conf | 2 +- manual-install/update-yaml.sh | 2 +- php/src/Data/ConfigurationManager.php | 2 +- readme.md | 2 +- tests/QA/060-environmental-variables.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e7e1bc02..0e43dea1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - NEXTCLOUD_MEMORY_LIMIT=512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - # - NEXTCLOUD_STARTUP_APPS=deck tasks calendar contacts # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup + # - NEXTCLOUD_STARTUP_APPS=deck tasks calendar contacts files_lock # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup # - 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. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container # - TALK_PORT=3478 # This allows to adjust the port that the talk container is using. diff --git a/manual-install/sample.conf b/manual-install/sample.conf index ae1ed7d0..c1c9f7d2 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -18,7 +18,7 @@ NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit o NEXTCLOUD_MEMORY_LIMIT=512M # This allows to change the PHP memory limit of the Nextcloud container NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR! NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin". -NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time +NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts files_lock" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory. NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container ONLYOFFICE_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index b9fb1373..80b0cef1 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -76,7 +76,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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time|' sample.conf +sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts files_lock" # 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 sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 9d21922e..5ea83f1f 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -726,7 +726,7 @@ class ConfigurationManager if (is_string($apps)) { return trim($apps); } - return 'deck tasks calendar contacts'; + return 'deck tasks calendar contacts files_lock'; } public function GetCollaboraDictionaries() : string { diff --git a/readme.md b/readme.md index 0e82ce4c..66117dc4 100644 --- a/readme.md +++ b/readme.md @@ -484,7 +484,7 @@ If you get an error during the domain validation which states that your ip-addre You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md) ### How to change the Nextcloud apps that are installed on the first startup? -You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. +You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts files_lock"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. ### How to add packets permanently to the Nextcloud container? Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require external dependencies. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index b0fca4f8..f956b411 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -15,7 +15,7 @@ - [ ] When starting the mastercontainer with `-e NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. -- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `deck tasks calendar contacts`. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `deck tasks calendar contacts files_lock`. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed and not imagemagick. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=inotify`, the resulting Nextcloud container should have the inotify extension installed and not the imagick extension. From e8e01f8687a989768a8a9d4c93803b095cd32648 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 22 Dec 2022 09:44:23 +0100 Subject: [PATCH 0267/3949] increase to 4.0.1 Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index fa2f303d..08484823 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -16,7 +16,7 @@
-

Nextcloud AIO v4.0.0

+

Nextcloud AIO v4.0.1

{# Add 2nd tab warning #} From d6208a0b18ab9f379a8cf038b495174d45679f17 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 22 Dec 2022 10:16:47 +0100 Subject: [PATCH 0268/3949] fix the comment Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 6dc829cf..c30c9d43 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -431,7 +431,7 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then fi fi else - echo "Warning: No ipv4-address found for the collabora container." + echo "Warning: No ipv4-address found for $NC_DOMAIN." fi if [ -n "$COLLABORA_IPv6_ADDRESS" ]; then if ! echo "$COLLABORA_ALLOW_LIST" | grep -q "$COLLABORA_IPv6_ADDRESS"; then @@ -442,7 +442,7 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then fi fi else - echo "No ipv6-address found for the collabora container." + echo "No ipv6-address found for $NC_DOMAIN." fi if [ -n "$COLLABORA_ALLOW_LIST" ]; then PRIVATE_IP_RANGES='127.0.0.1/8,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,fd00::/8,::1' From ed62ff1ff57b6904ee4c503959a246c1206f7091 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 22 Dec 2022 18:45:17 +0100 Subject: [PATCH 0269/3949] Revert "the files_lock app should get installed by default as well" Signed-off-by: Simon L --- docker-compose.yml | 2 +- manual-install/sample.conf | 2 +- manual-install/update-yaml.sh | 2 +- php/src/Data/ConfigurationManager.php | 2 +- readme.md | 2 +- tests/QA/060-environmental-variables.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0e43dea1..e7e1bc02 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud # - NEXTCLOUD_MEMORY_LIMIT=512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - # - NEXTCLOUD_STARTUP_APPS=deck tasks calendar contacts files_lock # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup + # - NEXTCLOUD_STARTUP_APPS=deck tasks calendar contacts # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup # - 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. See https://github.com/nextcloud/all-in-one#how-to-add-packets-permanently-to-the-nextcloud-container # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container # - TALK_PORT=3478 # This allows to adjust the port that the talk container is using. diff --git a/manual-install/sample.conf b/manual-install/sample.conf index c1c9f7d2..ae1ed7d0 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -18,7 +18,7 @@ NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit o NEXTCLOUD_MEMORY_LIMIT=512M # This allows to change the PHP memory limit of the Nextcloud container NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR! NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin". -NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts files_lock" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time +NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory. NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container ONLYOFFICE_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 80b0cef1..b9fb1373 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -76,7 +76,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|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts files_lock" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time|' sample.conf +sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts" # 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 sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 5ea83f1f..9d21922e 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -726,7 +726,7 @@ class ConfigurationManager if (is_string($apps)) { return trim($apps); } - return 'deck tasks calendar contacts files_lock'; + return 'deck tasks calendar contacts'; } public function GetCollaboraDictionaries() : string { diff --git a/readme.md b/readme.md index 66117dc4..0e82ce4c 100644 --- a/readme.md +++ b/readme.md @@ -484,7 +484,7 @@ If you get an error during the domain validation which states that your ip-addre You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md) ### How to change the Nextcloud apps that are installed on the first startup? -You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts files_lock"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. +You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `-e NEXTCLOUD_STARTUP_APPS="deck tasks calendar contacts"` to the docker run command of the mastercontainer and customize the value to your fitting. It must be a string with small letters a-z, spaces and hyphens or '_'. ### How to add packets permanently to the Nextcloud container? Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project very fast unmaintainable - there is an official way how you can add additional dependencies into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require external dependencies. diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md index f956b411..b0fca4f8 100644 --- a/tests/QA/060-environmental-variables.md +++ b/tests/QA/060-environmental-variables.md @@ -15,7 +15,7 @@ - [ ] When starting the mastercontainer with `-e NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host. See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-ca - [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it. -- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `deck tasks calendar contacts files_lock`. +- [ ] When starting the mastercontainer with `-e NEXTCLOUD_STARTUP_APPS=deck`, the resulting Nextcloud should have only installed the deck app and not the other apps that get installed by default. Default are `deck tasks calendar contacts`. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed and not imagemagick. - [ ] When starting the mastercontainer with `-e NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=inotify`, the resulting Nextcloud container should have the inotify extension installed and not the imagick extension. From 14e095b56980bcf752a80c484fb58bb7e9dbdcaf Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 23 Dec 2022 00:25:32 +0100 Subject: [PATCH 0270/3949] try to close #1314 Got it from: https://stackoverflow.com/a/41388585 & https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html In my test, it works Signed-off-by: Zoey --- reverse-proxy.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index c41193b0..475345a3 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -46,10 +46,11 @@ Add this as a new Apache site config: RewriteEngine On ProxyPreserveHost On AllowEncodedSlashes NoDecode - ProxyPass / http://localhost:11000/ + ProxyPass / http://localhost:11000/ nocanon RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] - RewriteRule ^/?(.*) "ws://localhost:11000/$1" [P,QSA,B=?:;] + RewriteCond %{THE_REQUEST} "^[a-zA-Z]+ /(.*) HTTP/\d+(\.\d+)?$" + RewriteRule .? "ws://localhost:11000/%1" [P,L] # Enable h2, h2c and http1.1 Protocols h2 h2c http/1.1 From ce165e05a1708eb9f1187420ff0559d0991f97fb Mon Sep 17 00:00:00 2001 From: ManOki Date: Fri, 23 Dec 2022 15:45:22 +0100 Subject: [PATCH 0271/3949] manual-install: add docker profiles for optional services Signed-off-by: ManOki --- manual-install/latest-arm64.yml | 21 +++++++++++++-------- manual-install/latest.yml | 24 +++++++++++++++--------- manual-install/readme.md | 5 +++++ 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/manual-install/latest-arm64.yml b/manual-install/latest-arm64.yml index 6b6198db..d4eb4661 100644 --- a/manual-install/latest-arm64.yml +++ b/manual-install/latest-arm64.yml @@ -28,7 +28,7 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-database: container_name: nextcloud-aio-database image: nextcloud/aio-postgresql:latest-arm64 @@ -45,7 +45,7 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-nextcloud: container_name: nextcloud-aio-nextcloud depends_on: @@ -101,7 +101,7 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-redis: container_name: nextcloud-aio-redis image: nextcloud/aio-redis:latest-arm64 @@ -112,9 +112,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-collabora: container_name: nextcloud-aio-collabora + profiles: ["collabora"] image: nextcloud/aio-collabora:latest-arm64 environment: - aliasgroup1=https://${NC_DOMAIN}:443 @@ -125,9 +126,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-talk: container_name: nextcloud-aio-talk + profiles: ["talk"] image: nextcloud/aio-talk:latest-arm64 ports: - ${TALK_PORT}:${TALK_PORT}/tcp @@ -143,9 +145,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-onlyoffice: container_name: nextcloud-aio-onlyoffice + profiles: ["onlyoffice"] image: nextcloud/aio-onlyoffice:latest-arm64 environment: - TZ=${TIMEZONE} @@ -158,9 +161,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-imaginary: container_name: nextcloud-aio-imaginary + profiles: ["imaginary"] image: nextcloud/aio-imaginary:latest-arm64 environment: - TZ=${TIMEZONE} @@ -168,9 +172,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-fulltextsearch: container_name: nextcloud-aio-fulltextsearch + profiles: ["fulltextsearch"] image: nextcloud/aio-fulltextsearch:latest-arm64 environment: - TZ=${TIMEZONE} diff --git a/manual-install/latest.yml b/manual-install/latest.yml index 02300f94..6a5c89e9 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -28,7 +28,7 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-database: container_name: nextcloud-aio-database image: nextcloud/aio-postgresql:latest @@ -45,7 +45,7 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-nextcloud: container_name: nextcloud-aio-nextcloud depends_on: @@ -104,7 +104,7 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-redis: container_name: nextcloud-aio-redis image: nextcloud/aio-redis:latest @@ -115,9 +115,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-collabora: container_name: nextcloud-aio-collabora + profiles: ["collabora"] image: nextcloud/aio-collabora:latest environment: - aliasgroup1=https://${NC_DOMAIN}:443 @@ -128,9 +129,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-talk: container_name: nextcloud-aio-talk + profiles: ["talk"] image: nextcloud/aio-talk:latest ports: - ${TALK_PORT}:${TALK_PORT}/tcp @@ -146,9 +148,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-clamav: container_name: nextcloud-aio-clamav + profiles: ["clamav"] image: nextcloud/aio-clamav:latest environment: - TZ=${TIMEZONE} @@ -158,9 +161,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-onlyoffice: container_name: nextcloud-aio-onlyoffice + profiles: ["onlyoffice"] image: nextcloud/aio-onlyoffice:latest environment: - TZ=${TIMEZONE} @@ -173,9 +177,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-imaginary: container_name: nextcloud-aio-imaginary + profiles: ["imaginary"] image: nextcloud/aio-imaginary:latest environment: - TZ=${TIMEZONE} @@ -183,9 +188,10 @@ services: restart: unless-stopped networks: - nextcloud-aio - + nextcloud-aio-fulltextsearch: container_name: nextcloud-aio-fulltextsearch + profiles: ["fulltextsearch"] image: nextcloud/aio-fulltextsearch:latest environment: - TZ=${TIMEZONE} diff --git a/manual-install/readme.md b/manual-install/readme.md index da98efa8..c496680b 100644 --- a/manual-install/readme.md +++ b/manual-install/readme.md @@ -27,6 +27,11 @@ Now copy the provided yaml file to a docker-compose file by running on x64 `cp l Now you should be ready to go with `sudo docker-compose --env-file my.conf up`. +## Docker profiles +The default profile of `latest.yml` only provide the minimum necessary services: nextcloud, database, redis and apache. To get optional services collabora, onlyoffice, talk, clamav, imaginary or fulltextsearch use additional arguments for each of them, for example `--profile collabora`. + +For a complete all-in-one with collabora use `sudo docker-compose --env-file my.conf --profile collabora --profile talk --profile clamav --profile imaginary --profile fulltextsearch up`. + ## How to update? Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers. 1. Run `sudo docker-compose --env-file my.conf down` to stop all running containers From 950ab32d26753d06748c8b35a575e97a382c61fc Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 23 Dec 2022 17:02:47 +0100 Subject: [PATCH 0272/3949] update mastercontainerto php 8.1 Signed-off-by: Simon L --- .github/workflows/create-psalm-container.yml | 2 +- .github/workflows/dependency-updates.yml | 2 +- .github/workflows/lint-php.yml | 2 +- .github/workflows/php-deprecation-detector.yml | 4 ++-- .github/workflows/psalm-analysis.yml | 4 ++-- .github/workflows/psalm-update-baseline.yml | 4 ++-- Containers/mastercontainer/Dockerfile | 2 +- php/composer.json | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/create-psalm-container.yml b/.github/workflows/create-psalm-container.yml index d4b021a3..36407589 100644 --- a/.github/workflows/create-psalm-container.yml +++ b/.github/workflows/create-psalm-container.yml @@ -23,7 +23,7 @@ jobs: - name: Modify the Dockerfile run: | set -x - sed -i 's|FROM php:7.4-alpine|FROM php:8.0-alpine|' "psalm-github-actions/Dockerfile" + sed -i 's|FROM php:7.4-alpine|FROM php:8.1-alpine|' "psalm-github-actions/Dockerfile" cat << APCU >> "psalm-github-actions/Dockerfile" RUN mkdir -p /usr/src/php/ext/apcu && \ curl -fsSL https://pecl.php.net/get/apcu | tar xvz -C "/usr/src/php/ext/apcu" --strip 1 && \ diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml index 9e0af73e..72a0a5e7 100644 --- a/.github/workflows/dependency-updates.yml +++ b/.github/workflows/dependency-updates.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: nanasess/setup-php@master with: - php-version: 8.0 + php-version: 8.1 extensions: apcu - name: Run dependency update script run: | diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 730d2aa4..28fae11b 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ["8.0"] + php-versions: ["8.1"] name: php-lint diff --git a/.github/workflows/php-deprecation-detector.yml b/.github/workflows/php-deprecation-detector.yml index bd25a68e..d45feade 100644 --- a/.github/workflows/php-deprecation-detector.yml +++ b/.github/workflows/php-deprecation-detector.yml @@ -13,10 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up php8.0 + - name: Set up php8.1 uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 extensions: apcu coverage: none diff --git a/.github/workflows/psalm-analysis.yml b/.github/workflows/psalm-analysis.yml index 0a5a42ad..5994862c 100644 --- a/.github/workflows/psalm-analysis.yml +++ b/.github/workflows/psalm-analysis.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up php8.0 + - name: Set up php8.1 uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 extensions: apcu coverage: none diff --git a/.github/workflows/psalm-update-baseline.yml b/.github/workflows/psalm-update-baseline.yml index 8492f071..53f2ec68 100644 --- a/.github/workflows/psalm-update-baseline.yml +++ b/.github/workflows/psalm-update-baseline.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up php8.0 + - name: Set up php8.1 uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 extensions: apcu coverage: none diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index 816954b0..a83454e0 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -5,7 +5,7 @@ FROM docker:20.10.21-dind-alpine3.16 as dind FROM caddy:2.6.2-alpine as caddy # From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile -FROM php:8.0.26-apache-bullseye +FROM php:8.1.13-apache-bullseye EXPOSE 80 EXPOSE 8080 diff --git a/php/composer.json b/php/composer.json index 5a0d46ed..d20a4fb7 100644 --- a/php/composer.json +++ b/php/composer.json @@ -5,7 +5,7 @@ } }, "require": { - "php": "^8.0", + "php": "^8.1", "ext-json": "*", "ext-sodium": "*", "ext-curl": "*", @@ -22,6 +22,6 @@ "psalm": "psalm --threads=1", "psalm:update-baseline": "psalm --threads=1 --update-baseline", "lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l {} \\;", - "php-deprecation-detector": "find . -name \\*.php -not -path './vendor/*' -exec phpdd scan {} -n -t 8.0 \\;" + "php-deprecation-detector": "find . -name \\*.php -not -path './vendor/*' -exec phpdd scan {} -n -t 8.1 \\;" } } From fbe8316e1d31e98f959dd7c8d75a15733948689a Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 23 Dec 2022 16:05:36 +0000 Subject: [PATCH 0273/3949] dependency updates Signed-off-by: Simon L --- php/composer.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index d8ec0b70..a31bf0a0 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "46e4dcf2df4e1a85aba17d664cacd815", + "content-hash": "7a318338d9e074d6f02e1fba5b3dda24", "packages": [ { "name": "guzzlehttp/guzzle", @@ -1375,25 +1375,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -1422,7 +1422,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -1438,7 +1438,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1768,7 +1768,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.0", + "php": "^8.1", "ext-json": "*", "ext-sodium": "*", "ext-curl": "*", From 7dc4edc1e037002f7d078db0764f89342cf77762 Mon Sep 17 00:00:00 2001 From: ManOki Date: Fri, 23 Dec 2022 17:23:49 +0100 Subject: [PATCH 0274/3949] manual-install: update readme to use default docker environment file .env Signed-off-by: ManOki --- .gitignore | 3 ++- manual-install/readme.md | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a27e8815..db327d1d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ /php/vendor /manual-install/*.conf !/manual-install/sample.conf -/manual-install/docker-compose.yml \ No newline at end of file +/manual-install/docker-compose.yml +/manual-install/.env diff --git a/manual-install/readme.md b/manual-install/readme.md index da98efa8..617eee60 100644 --- a/manual-install/readme.md +++ b/manual-install/readme.md @@ -21,20 +21,21 @@ First, install docker and docker-compose if not already done. Then simply run th git clone https://github.com/nextcloud/all-in-one.git cd all-in-one/manual-install ``` -Then copy the sample.conf to a new file, e.g. `cp sample.conf my.conf`, open the new conf file, e.g. with `nano my.conf`, edit all values that are marked with `# TODO!`, close and save the file. +Then copy the sample.conf to default environment file, e.g. `cp sample.conf .env`, open the new conf file, e.g. with `nano .env`, edit all values that are marked with `# TODO!`, close and save the file. Now copy the provided yaml file to a docker-compose file by running on x64 `cp latest.yml docker-compose.yml` and on arm64 `cp latest-arm64.yml docker-compose.yml`. -Now you should be ready to go with `sudo docker-compose --env-file my.conf up`. +Now you should be ready to go with `sudo docker-compose up`. ## How to update? Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers. -1. Run `sudo docker-compose --env-file my.conf down` to stop all running containers +1. If your previous copy of `sample.conf` is named `my.conf`, run `mv my.conf .env` +1. Run `sudo docker-compose down` to stop all running containers 1. Back up all important files and folders 1. Run `git pull` in order to get the updated yaml files from the repository. Now bring your `docker-compose.yml` file up-to-date with the updated one from the repository. You can use `diff docker-compose.yml latest.yml` on x64 and `diff docker-compose.yml latest-arm64.yml` on arm64 for comparing. 1. Also have a look at the `sample.conf` if any variable was added or renamed and add that to your conf file as well. Here may help the diff command as well. -1. After the file update was successful, simply run `sudo docker-compose --env-file my.conf pull` to pull the new images. -1. At the end run `sudo docker-compose --env-file my.conf up` in order to start and update the containers with the new configuration. +1. After the file update was successful, simply run `sudo docker-compose pull` to pull the new images. +1. At the end run `sudo docker-compose up` in order to start and update the containers with the new configuration. ## FAQ ### Backup and restore? From a81be7c35c988e5d925199f154121f2085cdf555 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 23 Dec 2022 21:40:15 +0100 Subject: [PATCH 0275/3949] update script to add the profiles option automatically Signed-off-by: Simon L --- manual-install/update-yaml.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index b9fb1373..78fcb211 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -92,6 +92,11 @@ do if [ "$name" != "nextcloud-aio-apache" ]; then OUTPUT="$(echo "$OUTPUT" | sed "/ $name:/i\ ")" fi + if ! echo "$name" | grep "apache$" && ! echo "$name" | grep "database$" && ! echo "$name" | grep "nextcloud$" && ! echo "$name" | grep "redis$"; then + sed -i '/container_name/d' containers.yml + SLIM_NAME="${name##nextcloud-aio-}" + OUTPUT="$(echo "$OUTPUT" | sed "/container_name: $name$/a\ \ \ \ profiles:\ \[\"$SLIM_NAME\"\]")" + fi done OUTPUT="$(echo "$OUTPUT" | sed "/restart: /a\ \ \ \ networks:\n\ \ \ \ \ \ - nextcloud-aio")" From 653c63565ef7b02b5ed79cb92db1279fb2cb7b11 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 23 Dec 2022 21:53:01 +0100 Subject: [PATCH 0276/3949] remove spaces in empty lines Signed-off-by: Simon L --- manual-install/update-yaml.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 78fcb211..21d6c261 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -107,6 +107,7 @@ echo "" >> containers.yml echo "$OUTPUT" >> containers.yml sed -i '/container_name/d' containers.yml +sed -i 's|^ $||' containers.yml VOLUMES="$(grep -oP 'nextcloud_aio_[a-z_]+' containers.yml | sort -u)" mapfile -t VOLUMES <<< "$VOLUMES" @@ -131,7 +132,7 @@ sed -i '/image:/s/$/:latest/' latest.yml cat containers.yml > latest-arm64.yml sed -i '/image:/s/$/:latest-arm64/' latest-arm64.yml -sed -i '/ nextcloud-aio-clamav:/,/^ $/d' latest-arm64.yml +sed -i '/ nextcloud-aio-clamav:/,/^$/d' latest-arm64.yml sed -i '/nextcloud[-_]aio[-_]clamav/d' latest-arm64.yml sed -i '/CLAMAV_ENABLED/d' latest-arm64.yml From 377058cef1ae8113b868ac472d686756843664fb Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 23 Dec 2022 22:03:00 +0100 Subject: [PATCH 0277/3949] make description of the mv command a bit clearer Signed-off-by: Simon L --- manual-install/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual-install/readme.md b/manual-install/readme.md index 617eee60..8e52e932 100644 --- a/manual-install/readme.md +++ b/manual-install/readme.md @@ -29,7 +29,7 @@ Now you should be ready to go with `sudo docker-compose up`. ## How to update? Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers. -1. If your previous copy of `sample.conf` is named `my.conf`, run `mv my.conf .env` +1. If your previous copy of `sample.conf` is named `my.conf`, run `mv my.conf .env` in order to rename the file to `.env`. 1. Run `sudo docker-compose down` to stop all running containers 1. Back up all important files and folders 1. Run `git pull` in order to get the updated yaml files from the repository. Now bring your `docker-compose.yml` file up-to-date with the updated one from the repository. You can use `diff docker-compose.yml latest.yml` on x64 and `diff docker-compose.yml latest-arm64.yml` on arm64 for comparing. From 4750fb228f04012eb2bfd65653c30258615faa01 Mon Sep 17 00:00:00 2001 From: ManOki Date: Sat, 24 Dec 2022 10:55:49 +0100 Subject: [PATCH 0278/3949] manual-install: add IMAGE_TAG to omit separate latest-arm64.yml (#1591) * manual-install: add IMAGE_TAG to omit separate latest-arm64.yml Signed-off-by: ManOki Co-authored-by: Simon L. --- manual-install/latest-arm64.yml | 208 -------------------------------- manual-install/latest.yml | 20 +-- manual-install/readme.md | 6 +- manual-install/sample.conf | 3 +- manual-install/update-yaml.sh | 10 +- 5 files changed, 18 insertions(+), 229 deletions(-) delete mode 100644 manual-install/latest-arm64.yml diff --git a/manual-install/latest-arm64.yml b/manual-install/latest-arm64.yml deleted file mode 100644 index d4eb4661..00000000 --- a/manual-install/latest-arm64.yml +++ /dev/null @@ -1,208 +0,0 @@ -version: "3.8" - -services: - nextcloud-aio-apache: - container_name: nextcloud-aio-apache - depends_on: - - nextcloud-aio-onlyoffice - - nextcloud-aio-collabora - - nextcloud-aio-talk - - nextcloud-aio-nextcloud - image: nextcloud/aio-apache:latest-arm64 - ports: - - ${APACHE_PORT}:${APACHE_PORT}/tcp - environment: - - NC_DOMAIN=${NC_DOMAIN} - - NEXTCLOUD_HOST=nextcloud-aio-nextcloud - - COLLABORA_HOST=nextcloud-aio-collabora - - TALK_HOST=nextcloud-aio-talk - - APACHE_PORT=${APACHE_PORT} - - ONLYOFFICE_HOST=nextcloud-aio-onlyoffice - - TZ=${TIMEZONE} - - APACHE_MAX_SIZE=${APACHE_MAX_SIZE} - - APACHE_MAX_TIME=${NEXTCLOUD_MAX_TIME} - volumes: - - nextcloud_aio_nextcloud:/var/www/html:ro - - nextcloud_aio_apache:/mnt/data:rw - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-database: - container_name: nextcloud-aio-database - image: nextcloud/aio-postgresql:latest-arm64 - volumes: - - nextcloud_aio_database:/var/lib/postgresql/data:rw - - nextcloud_aio_database_dump:/mnt/data:rw - environment: - - POSTGRES_PASSWORD=${DATABASE_PASSWORD} - - POSTGRES_DB=nextcloud_database - - POSTGRES_USER=nextcloud - - TZ=${TIMEZONE} - - PGTZ=${TIMEZONE} - stop_grace_period: 1800s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-nextcloud: - container_name: nextcloud-aio-nextcloud - depends_on: - - nextcloud-aio-database - - nextcloud-aio-redis - - nextcloud-aio-fulltextsearch - - nextcloud-aio-imaginary - image: nextcloud/aio-nextcloud:latest-arm64 - volumes: - - nextcloud_aio_nextcloud:/var/www/html:rw - - ${NEXTCLOUD_DATADIR}:/mnt/ncdata:rw - - ${NEXTCLOUD_MOUNT}:${NEXTCLOUD_MOUNT}:rw - - ${NEXTCLOUD_TRUSTED_CACERTS_DIR}:/usr/local/share/ca-certificates:ro - environment: - - POSTGRES_HOST=nextcloud-aio-database - - POSTGRES_PASSWORD=${DATABASE_PASSWORD} - - POSTGRES_DB=nextcloud_database - - POSTGRES_USER=nextcloud - - REDIS_HOST=nextcloud-aio-redis - - REDIS_HOST_PASSWORD=${REDIS_PASSWORD} - - AIO_TOKEN=${AIO_TOKEN} - - NC_DOMAIN=${NC_DOMAIN} - - ADMIN_USER=admin - - ADMIN_PASSWORD=${NEXTCLOUD_PASSWORD} - - NEXTCLOUD_DATA_DIR=/mnt/ncdata - - OVERWRITEHOST=${NC_DOMAIN} - - OVERWRITEPROTOCOL=https - - TURN_SECRET=${TURN_SECRET} - - SIGNALING_SECRET=${SIGNALING_SECRET} - - ONLYOFFICE_SECRET=${ONLYOFFICE_SECRET} - - AIO_URL=${AIO_URL} - - NEXTCLOUD_MOUNT=${NEXTCLOUD_MOUNT} - - ONLYOFFICE_ENABLED=${ONLYOFFICE_ENABLED} - - COLLABORA_ENABLED=${COLLABORA_ENABLED} - - COLLABORA_HOST=nextcloud-aio-collabora - - TALK_ENABLED=${TALK_ENABLED} - - ONLYOFFICE_HOST=nextcloud-aio-onlyoffice - - UPDATE_NEXTCLOUD_APPS=${UPDATE_NEXTCLOUD_APPS} - - TZ=${TIMEZONE} - - TALK_PORT=${TALK_PORT} - - IMAGINARY_ENABLED=${IMAGINARY_ENABLED} - - IMAGINARY_HOST=nextcloud-aio-imaginary - - PHP_UPLOAD_LIMIT=${NEXTCLOUD_UPLOAD_LIMIT} - - PHP_MEMORY_LIMIT=${NEXTCLOUD_MEMORY_LIMIT} - - FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED} - - FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch - - PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME} - - TRUSTED_CACERTS_DIR=${NEXTCLOUD_TRUSTED_CACERTS_DIR} - - STARTUP_APPS=${NEXTCLOUD_STARTUP_APPS} - - ADDITIONAL_APKS=${NEXTCLOUD_ADDITIONAL_APKS} - - ADDITIONAL_PHP_EXTENSIONS=${NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS} - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-redis: - container_name: nextcloud-aio-redis - image: nextcloud/aio-redis:latest-arm64 - environment: - - REDIS_HOST_PASSWORD=${REDIS_PASSWORD} - - TZ=${TIMEZONE} - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-collabora: - container_name: nextcloud-aio-collabora - profiles: ["collabora"] - image: nextcloud/aio-collabora:latest-arm64 - environment: - - aliasgroup1=https://${NC_DOMAIN}:443 - - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true ${COLLABORA_SECCOMP_POLICY} - - dictionaries=${COLLABORA_DICTIONARIES} - - TZ=${TIMEZONE} - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-talk: - container_name: nextcloud-aio-talk - profiles: ["talk"] - image: nextcloud/aio-talk:latest-arm64 - ports: - - ${TALK_PORT}:${TALK_PORT}/tcp - - ${TALK_PORT}:${TALK_PORT}/udp - environment: - - NC_DOMAIN=${NC_DOMAIN} - - TURN_SECRET=${TURN_SECRET} - - SIGNALING_SECRET=${SIGNALING_SECRET} - - JANUS_API_KEY=${JANUS_API_KEY} - - TZ=${TIMEZONE} - - TALK_PORT=${TALK_PORT} - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-onlyoffice: - container_name: nextcloud-aio-onlyoffice - profiles: ["onlyoffice"] - image: nextcloud/aio-onlyoffice:latest-arm64 - environment: - - TZ=${TIMEZONE} - - JWT_ENABLED=true - - JWT_HEADER=AuthorizationJwt - - JWT_SECRET=${ONLYOFFICE_SECRET} - volumes: - - nextcloud_aio_onlyoffice:/var/lib/onlyoffice:rw - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-imaginary: - container_name: nextcloud-aio-imaginary - profiles: ["imaginary"] - image: nextcloud/aio-imaginary:latest-arm64 - environment: - - TZ=${TIMEZONE} - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - - nextcloud-aio-fulltextsearch: - container_name: nextcloud-aio-fulltextsearch - profiles: ["fulltextsearch"] - image: nextcloud/aio-fulltextsearch:latest-arm64 - environment: - - TZ=${TIMEZONE} - - discovery.type=single-node - - ES_JAVA_OPTS=-Xms1024M -Xmx1024M - volumes: - - nextcloud_aio_elasticsearch:/usr/share/elasticsearch/data:rw - stop_grace_period: 10s - restart: unless-stopped - networks: - - nextcloud-aio - -volumes: - nextcloud_aio_apache: - name: nextcloud_aio_apache - nextcloud_aio_database: - name: nextcloud_aio_database - nextcloud_aio_database_dump: - name: nextcloud_aio_database_dump - nextcloud_aio_elasticsearch: - name: nextcloud_aio_elasticsearch - nextcloud_aio_nextcloud: - name: nextcloud_aio_nextcloud - nextcloud_aio_onlyoffice: - name: nextcloud_aio_onlyoffice - nextcloud_aio_nextcloud_data: - name: nextcloud_aio_nextcloud_data - -networks: - nextcloud-aio: diff --git a/manual-install/latest.yml b/manual-install/latest.yml index 6a5c89e9..2c8d94ae 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -8,7 +8,7 @@ services: - nextcloud-aio-collabora - nextcloud-aio-talk - nextcloud-aio-nextcloud - image: nextcloud/aio-apache:latest + image: nextcloud/aio-apache:${IMAGE_TAG} ports: - ${APACHE_PORT}:${APACHE_PORT}/tcp environment: @@ -31,7 +31,7 @@ services: nextcloud-aio-database: container_name: nextcloud-aio-database - image: nextcloud/aio-postgresql:latest + image: nextcloud/aio-postgresql:${IMAGE_TAG} volumes: - nextcloud_aio_database:/var/lib/postgresql/data:rw - nextcloud_aio_database_dump:/mnt/data:rw @@ -54,7 +54,7 @@ services: - nextcloud-aio-clamav - nextcloud-aio-fulltextsearch - nextcloud-aio-imaginary - image: nextcloud/aio-nextcloud:latest + image: nextcloud/aio-nextcloud:${IMAGE_TAG} volumes: - nextcloud_aio_nextcloud:/var/www/html:rw - ${NEXTCLOUD_DATADIR}:/mnt/ncdata:rw @@ -107,7 +107,7 @@ services: nextcloud-aio-redis: container_name: nextcloud-aio-redis - image: nextcloud/aio-redis:latest + image: nextcloud/aio-redis:${IMAGE_TAG} environment: - REDIS_HOST_PASSWORD=${REDIS_PASSWORD} - TZ=${TIMEZONE} @@ -118,8 +118,8 @@ services: nextcloud-aio-collabora: container_name: nextcloud-aio-collabora + image: nextcloud/aio-collabora:${IMAGE_TAG} profiles: ["collabora"] - image: nextcloud/aio-collabora:latest environment: - aliasgroup1=https://${NC_DOMAIN}:443 - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true ${COLLABORA_SECCOMP_POLICY} @@ -132,8 +132,8 @@ services: nextcloud-aio-talk: container_name: nextcloud-aio-talk + image: nextcloud/aio-talk:${IMAGE_TAG} profiles: ["talk"] - image: nextcloud/aio-talk:latest ports: - ${TALK_PORT}:${TALK_PORT}/tcp - ${TALK_PORT}:${TALK_PORT}/udp @@ -151,8 +151,8 @@ services: nextcloud-aio-clamav: container_name: nextcloud-aio-clamav + image: nextcloud/aio-clamav:${IMAGE_TAG} profiles: ["clamav"] - image: nextcloud/aio-clamav:latest environment: - TZ=${TIMEZONE} volumes: @@ -164,8 +164,8 @@ services: nextcloud-aio-onlyoffice: container_name: nextcloud-aio-onlyoffice + image: nextcloud/aio-onlyoffice:${IMAGE_TAG} profiles: ["onlyoffice"] - image: nextcloud/aio-onlyoffice:latest environment: - TZ=${TIMEZONE} - JWT_ENABLED=true @@ -180,8 +180,8 @@ services: nextcloud-aio-imaginary: container_name: nextcloud-aio-imaginary + image: nextcloud/aio-imaginary:${IMAGE_TAG} profiles: ["imaginary"] - image: nextcloud/aio-imaginary:latest environment: - TZ=${TIMEZONE} stop_grace_period: 10s @@ -191,8 +191,8 @@ services: nextcloud-aio-fulltextsearch: container_name: nextcloud-aio-fulltextsearch + image: nextcloud/aio-fulltextsearch:${IMAGE_TAG} profiles: ["fulltextsearch"] - image: nextcloud/aio-fulltextsearch:latest environment: - TZ=${TIMEZONE} - discovery.type=single-node diff --git a/manual-install/readme.md b/manual-install/readme.md index 07a45c5a..ffa026b6 100644 --- a/manual-install/readme.md +++ b/manual-install/readme.md @@ -21,16 +21,16 @@ First, install docker and docker-compose if not already done. Then simply run th git clone https://github.com/nextcloud/all-in-one.git cd all-in-one/manual-install ``` -Then copy the sample.conf to default environment file, e.g. `cp sample.conf .env`, open the new conf file, e.g. with `nano .env`, edit all values that are marked with `# TODO!`, close and save the file. +Then copy the sample.conf to default environment file, e.g. `cp sample.conf .env`, open the new conf file, e.g. with `nano .env`, edit all values that are marked with `# TODO!`, close and save the file. For arm64 support use `IMAGE_TAG=latest-arm64` (Note: there is no clamav image for arm64). -Now copy the provided yaml file to a docker-compose file by running on x64 `cp latest.yml docker-compose.yml` and on arm64 `cp latest-arm64.yml docker-compose.yml`. +Now copy the provided yaml file to a docker-compose file by running `cp latest.yml docker-compose.yml`. Now you should be ready to go with `sudo docker-compose up`. ## Docker profiles The default profile of `latest.yml` only provide the minimum necessary services: nextcloud, database, redis and apache. To get optional services collabora, onlyoffice, talk, clamav, imaginary or fulltextsearch use additional arguments for each of them, for example `--profile collabora`. -For a complete all-in-one with collabora use `sudo docker-compose --env-file my.conf --profile collabora --profile talk --profile clamav --profile imaginary --profile fulltextsearch up`. +For a complete all-in-one with collabora use `sudo docker-compose --profile collabora --profile talk --profile clamav --profile imaginary --profile fulltextsearch up`. ## How to update? Since the AIO containers may change in the future, it is highly recommended to strictly follow the following procedure whenever you want to upgrade your containers. diff --git a/manual-install/sample.conf b/manual-install/sample.conf index ae1ed7d0..2eaf66c9 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -1,8 +1,9 @@ +IMAGE_TAG=latest # Version of docker images, should be latest or latest-arm64. Note: latest-arm64 has no clamav support AIO_TOKEN=123456 # Has no function but needs to be set! AIO_URL=localhost # Has no function but needs to be set! APACHE_MAX_SIZE=10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy. -CLAMAV_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. +CLAMAV_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. Note: latest-arm64 has no clamav support 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 COLLABORA_ENABLED=yes # Setting this to "yes" enables the option in Nextcloud automatically. COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container. diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 21d6c261..ac6a9ae9 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -46,6 +46,7 @@ do done rm -f sample.conf +echo 'IMAGE_TAG=latest # Version of docker images, should be latest or latest-arm64. Note: latest-arm64 has no clamav support' >> sample.conf VARIABLES="$(grep -oP '%[A-Z_a-z0-6]+%' containers.yml | sort -u)" mapfile -t VARIABLES <<< "$VARIABLES" for variable in "${VARIABLES[@]}" @@ -57,6 +58,7 @@ do done sed -i 's|_ENABLED=|_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically.|' sample.conf +sed -i 's|CLAMAV_ENABLED=no|CLAMAV_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically. Note: latest-arm64 has no clamav support|' sample.conf sed -i 's|TALK_ENABLED=no|TALK_ENABLED=yes|' sample.conf sed -i 's|COLLABORA_ENABLED=no|COLLABORA_ENABLED=yes|' sample.conf sed -i 's|COLLABORA_DICTIONARIES=|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|' sample.conf @@ -128,12 +130,6 @@ networks: NETWORK cat containers.yml > latest.yml -sed -i '/image:/s/$/:latest/' latest.yml - -cat containers.yml > latest-arm64.yml -sed -i '/image:/s/$/:latest-arm64/' latest-arm64.yml -sed -i '/ nextcloud-aio-clamav:/,/^$/d' latest-arm64.yml -sed -i '/nextcloud[-_]aio[-_]clamav/d' latest-arm64.yml -sed -i '/CLAMAV_ENABLED/d' latest-arm64.yml +sed -i "/image:/s/$/:\${IMAGE_TAG}/" latest.yml rm containers.yml From 7720ed50616872af3375ee07a4fcb55bab9bde98 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:36:19 +0100 Subject: [PATCH 0279/3949] rename identifier to container_name Signed-off-by: Simon L --- manual-install/update-yaml.sh | 7 +++---- php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 14 +++++++------- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index ac6a9ae9..b5ad664c 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -7,9 +7,9 @@ sed -i 's|","writeable":true|:rw"|g' /tmp/containers.json OUTPUT="$(cat /tmp/containers.json)" OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[].internalPorts)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[].secrets)')" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.identifier == "nextcloud-aio-watchtower"))')" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.identifier == "nextcloud-aio-domaincheck"))')" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.identifier == "nextcloud-aio-borgbackup"))')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.container_name == "nextcloud-aio-watchtower"))')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.container_name == "nextcloud-aio-domaincheck"))')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.container_name == "nextcloud-aio-borgbackup"))')" snap install yq mkdir -p ./manual-install @@ -18,7 +18,6 @@ echo "$OUTPUT" | yq -P > ./manual-install/containers.yml cd manual-install || exit sed -i "s|'||g" containers.yml sed -i 's|production:|services:|' containers.yml -sed -i 's|- identifier:| container_name:|' containers.yml sed -i 's|restartPolicy:|restart:|' containers.yml sed -i 's|environmentVariables:|environment:|' containers.yml sed -i '/displayName:/d' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index 1a668d38..69894f0c 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -29,7 +29,7 @@ "type": "string" } }, - "identifier": { + "container_name": { "type": "string" }, "internalPorts": { diff --git a/php/containers.json b/php/containers.json index 77bbcb76..90a143cd 100644 --- a/php/containers.json +++ b/php/containers.json @@ -1,7 +1,7 @@ { "production": [ { - "identifier": "nextcloud-aio-apache", + "container_name": "nextcloud-aio-apache", "dependsOn": [ "nextcloud-aio-onlyoffice", "nextcloud-aio-collabora", @@ -44,7 +44,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-database", + "container_name": "nextcloud-aio-database", "dependsOn": [], "displayName": "Database", "containerName": "nextcloud/aio-postgresql", @@ -78,7 +78,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-nextcloud", + "container_name": "nextcloud-aio-nextcloud", "dependsOn": [ "nextcloud-aio-database", "nextcloud-aio-redis", @@ -166,7 +166,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-redis", + "container_name": "nextcloud-aio-redis", "dependsOn": [], "displayName": "Redis", "containerName": "nextcloud/aio-redis", @@ -193,7 +193,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-collabora", + "container_name": "nextcloud-aio-collabora", "dependsOn": [], "displayName": "Collabora", "containerName": "nextcloud/aio-collabora", @@ -219,7 +219,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-talk", + "container_name": "nextcloud-aio-talk", "dependsOn": [], "displayName": "Talk", "containerName": "nextcloud/aio-talk", @@ -248,7 +248,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-borgbackup", + "container_name": "nextcloud-aio-borgbackup", "dependsOn": [], "displayName": "Borgbackup", "containerName": "nextcloud/aio-borgbackup", @@ -321,7 +321,7 @@ "restartPolicy": "" }, { - "identifier": "nextcloud-aio-watchtower", + "container_name": "nextcloud-aio-watchtower", "dependsOn": [], "displayName": "Watchtower", "containerName": "nextcloud/aio-watchtower", @@ -343,7 +343,7 @@ }, { "dependsOn": [], - "identifier": "nextcloud-aio-domaincheck", + "container_name": "nextcloud-aio-domaincheck", "displayName": "Domaincheck", "containerName": "nextcloud/aio-domaincheck", "ports": [ @@ -362,7 +362,7 @@ "restartPolicy": "" }, { - "identifier": "nextcloud-aio-clamav", + "container_name": "nextcloud-aio-clamav", "dependsOn": [], "displayName": "ClamAV", "containerName": "nextcloud/aio-clamav", @@ -386,7 +386,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-onlyoffice", + "container_name": "nextcloud-aio-onlyoffice", "dependsOn": [], "displayName": "OnlyOffice", "containerName": "nextcloud/aio-onlyoffice", @@ -414,7 +414,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-imaginary", + "container_name": "nextcloud-aio-imaginary", "dependsOn": [], "displayName": "Imaginary", "containerName": "nextcloud/aio-imaginary", @@ -431,7 +431,7 @@ "restartPolicy": "unless-stopped" }, { - "identifier": "nextcloud-aio-fulltextsearch", + "container_name": "nextcloud-aio-fulltextsearch", "dependsOn": [], "displayName": "Fulltextsearch", "containerName": "nextcloud/aio-fulltextsearch", diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index f2d30804..6c5266d4 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -49,27 +49,27 @@ class ContainerDefinitionFetcher $containers = []; foreach ($data['production'] as $entry) { - if ($entry['identifier'] === 'nextcloud-aio-clamav') { + if ($entry['container_name'] === 'nextcloud-aio-clamav') { if (!$this->configurationManager->isClamavEnabled()) { continue; } - } elseif ($entry['identifier'] === 'nextcloud-aio-onlyoffice') { + } elseif ($entry['container_name'] === 'nextcloud-aio-onlyoffice') { if (!$this->configurationManager->isOnlyofficeEnabled()) { continue; } - } elseif ($entry['identifier'] === 'nextcloud-aio-collabora') { + } elseif ($entry['container_name'] === 'nextcloud-aio-collabora') { if (!$this->configurationManager->isCollaboraEnabled()) { continue; } - } elseif ($entry['identifier'] === 'nextcloud-aio-talk') { + } elseif ($entry['container_name'] === 'nextcloud-aio-talk') { if (!$this->configurationManager->isTalkEnabled()) { continue; } - } elseif ($entry['identifier'] === 'nextcloud-aio-imaginary') { + } elseif ($entry['container_name'] === 'nextcloud-aio-imaginary') { if (!$this->configurationManager->isImaginaryEnabled()) { continue; } - } elseif ($entry['identifier'] === 'nextcloud-aio-fulltextsearch') { + } elseif ($entry['container_name'] === 'nextcloud-aio-fulltextsearch') { if (!$this->configurationManager->isFulltextsearchEnabled()) { continue; } @@ -177,7 +177,7 @@ class ContainerDefinitionFetcher } $containers[] = new Container( - $entry['identifier'], + $entry['container_name'], $entry['displayName'], $entry['containerName'], $entry['restartPolicy'], From 6cca3ceb6c3707f1da04b7cad1fecdc0baf9f075 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:39:22 +0100 Subject: [PATCH 0280/3949] rename dependsOn to depends_on Signed-off-by: Simon L --- manual-install/update-yaml.sh | 1 - php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index b5ad664c..fc1c20ae 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -25,7 +25,6 @@ sed -i 's|maxShutdownTime:|stop_grace_period:|' containers.yml sed -i '/stop_grace_period:/s/$/s/' containers.yml sed -i 's|containerName:|image:|' containers.yml sed -i '/: \[\]/d' containers.yml -sed -i 's|dependsOn:|depends_on:|' containers.yml sed -i 's|- name: |- |' containers.yml TCP="$(grep -oP '[%A-Z0-9_]+/tcp' containers.yml | sort -u)" diff --git a/php/containers-schema.json b/php/containers-schema.json index 69894f0c..2df81a93 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -14,7 +14,7 @@ "containerName": { "type": "string" }, - "dependsOn": { + "depends_on": { "type": "array", "items": { "type": "string" diff --git a/php/containers.json b/php/containers.json index 90a143cd..3c436062 100644 --- a/php/containers.json +++ b/php/containers.json @@ -2,7 +2,7 @@ "production": [ { "container_name": "nextcloud-aio-apache", - "dependsOn": [ + "depends_on": [ "nextcloud-aio-onlyoffice", "nextcloud-aio-collabora", "nextcloud-aio-talk", @@ -45,7 +45,7 @@ }, { "container_name": "nextcloud-aio-database", - "dependsOn": [], + "depends_on": [], "displayName": "Database", "containerName": "nextcloud/aio-postgresql", "ports": [], @@ -79,7 +79,7 @@ }, { "container_name": "nextcloud-aio-nextcloud", - "dependsOn": [ + "depends_on": [ "nextcloud-aio-database", "nextcloud-aio-redis", "nextcloud-aio-clamav", @@ -167,7 +167,7 @@ }, { "container_name": "nextcloud-aio-redis", - "dependsOn": [], + "depends_on": [], "displayName": "Redis", "containerName": "nextcloud/aio-redis", "ports": [], @@ -194,7 +194,7 @@ }, { "container_name": "nextcloud-aio-collabora", - "dependsOn": [], + "depends_on": [], "displayName": "Collabora", "containerName": "nextcloud/aio-collabora", "ports": [], @@ -220,7 +220,7 @@ }, { "container_name": "nextcloud-aio-talk", - "dependsOn": [], + "depends_on": [], "displayName": "Talk", "containerName": "nextcloud/aio-talk", "ports": [ @@ -249,7 +249,7 @@ }, { "container_name": "nextcloud-aio-borgbackup", - "dependsOn": [], + "depends_on": [], "displayName": "Borgbackup", "containerName": "nextcloud/aio-borgbackup", "ports": [], @@ -322,7 +322,7 @@ }, { "container_name": "nextcloud-aio-watchtower", - "dependsOn": [], + "depends_on": [], "displayName": "Watchtower", "containerName": "nextcloud/aio-watchtower", "ports": [], @@ -342,7 +342,7 @@ "restartPolicy": "" }, { - "dependsOn": [], + "depends_on": [], "container_name": "nextcloud-aio-domaincheck", "displayName": "Domaincheck", "containerName": "nextcloud/aio-domaincheck", @@ -363,7 +363,7 @@ }, { "container_name": "nextcloud-aio-clamav", - "dependsOn": [], + "depends_on": [], "displayName": "ClamAV", "containerName": "nextcloud/aio-clamav", "ports": [], @@ -387,7 +387,7 @@ }, { "container_name": "nextcloud-aio-onlyoffice", - "dependsOn": [], + "depends_on": [], "displayName": "OnlyOffice", "containerName": "nextcloud/aio-onlyoffice", "ports": [], @@ -415,7 +415,7 @@ }, { "container_name": "nextcloud-aio-imaginary", - "dependsOn": [], + "depends_on": [], "displayName": "Imaginary", "containerName": "nextcloud/aio-imaginary", "ports": [], @@ -432,7 +432,7 @@ }, { "container_name": "nextcloud-aio-fulltextsearch", - "dependsOn": [], + "depends_on": [], "displayName": "Fulltextsearch", "containerName": "nextcloud/aio-fulltextsearch", "ports": [], diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 6c5266d4..3e2f21fd 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -142,7 +142,7 @@ class ContainerDefinitionFetcher } $dependsOn = []; - foreach ($entry['dependsOn'] as $value) { + foreach ($entry['depends_on'] as $value) { if ($value === 'nextcloud-aio-clamav') { if (!$this->configurationManager->isClamavEnabled()) { continue; From 4a69d53a67a2893951cd9afed461996586e91f57 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:43:26 +0100 Subject: [PATCH 0281/3949] rename containerName to image Signed-off-by: Simon L --- manual-install/update-yaml.sh | 1 - php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index fc1c20ae..3b82bcaf 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -23,7 +23,6 @@ sed -i 's|environmentVariables:|environment:|' containers.yml sed -i '/displayName:/d' containers.yml sed -i 's|maxShutdownTime:|stop_grace_period:|' containers.yml sed -i '/stop_grace_period:/s/$/s/' containers.yml -sed -i 's|containerName:|image:|' containers.yml sed -i '/: \[\]/d' containers.yml sed -i 's|- name: |- |' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index 2df81a93..ba355dbe 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -11,7 +11,7 @@ "additionalProperties": false, "minProperties": 11, "properties": { - "containerName": { + "image": { "type": "string" }, "depends_on": { diff --git a/php/containers.json b/php/containers.json index 3c436062..a0a9a26e 100644 --- a/php/containers.json +++ b/php/containers.json @@ -9,7 +9,7 @@ "nextcloud-aio-nextcloud" ], "displayName": "Apache", - "containerName": "nextcloud/aio-apache", + "image": "nextcloud/aio-apache", "ports": [ "%APACHE_PORT%/tcp" ], @@ -47,7 +47,7 @@ "container_name": "nextcloud-aio-database", "depends_on": [], "displayName": "Database", - "containerName": "nextcloud/aio-postgresql", + "image": "nextcloud/aio-postgresql", "ports": [], "internalPorts": [ "5432" @@ -87,7 +87,7 @@ "nextcloud-aio-imaginary" ], "displayName": "Nextcloud", - "containerName": "nextcloud/aio-nextcloud", + "image": "nextcloud/aio-nextcloud", "ports": [], "internalPorts": [ "9000" @@ -169,7 +169,7 @@ "container_name": "nextcloud-aio-redis", "depends_on": [], "displayName": "Redis", - "containerName": "nextcloud/aio-redis", + "image": "nextcloud/aio-redis", "ports": [], "internalPorts": [ "6379" @@ -196,7 +196,7 @@ "container_name": "nextcloud-aio-collabora", "depends_on": [], "displayName": "Collabora", - "containerName": "nextcloud/aio-collabora", + "image": "nextcloud/aio-collabora", "ports": [], "internalPorts": [ "9980" @@ -222,7 +222,7 @@ "container_name": "nextcloud-aio-talk", "depends_on": [], "displayName": "Talk", - "containerName": "nextcloud/aio-talk", + "image": "nextcloud/aio-talk", "ports": [ "%TALK_PORT%/tcp", "%TALK_PORT%/udp" @@ -251,7 +251,7 @@ "container_name": "nextcloud-aio-borgbackup", "depends_on": [], "displayName": "Borgbackup", - "containerName": "nextcloud/aio-borgbackup", + "image": "nextcloud/aio-borgbackup", "ports": [], "internalPorts": [], "environmentVariables": [ @@ -324,7 +324,7 @@ "container_name": "nextcloud-aio-watchtower", "depends_on": [], "displayName": "Watchtower", - "containerName": "nextcloud/aio-watchtower", + "image": "nextcloud/aio-watchtower", "ports": [], "internalPorts": [], "environmentVariables": [ @@ -345,7 +345,7 @@ "depends_on": [], "container_name": "nextcloud-aio-domaincheck", "displayName": "Domaincheck", - "containerName": "nextcloud/aio-domaincheck", + "image": "nextcloud/aio-domaincheck", "ports": [ "%APACHE_PORT%/tcp" ], @@ -365,7 +365,7 @@ "container_name": "nextcloud-aio-clamav", "depends_on": [], "displayName": "ClamAV", - "containerName": "nextcloud/aio-clamav", + "image": "nextcloud/aio-clamav", "ports": [], "internalPorts": [ "3310" @@ -389,7 +389,7 @@ "container_name": "nextcloud-aio-onlyoffice", "depends_on": [], "displayName": "OnlyOffice", - "containerName": "nextcloud/aio-onlyoffice", + "image": "nextcloud/aio-onlyoffice", "ports": [], "internalPorts": [ "80" @@ -417,7 +417,7 @@ "container_name": "nextcloud-aio-imaginary", "depends_on": [], "displayName": "Imaginary", - "containerName": "nextcloud/aio-imaginary", + "image": "nextcloud/aio-imaginary", "ports": [], "internalPorts": [ "9000" @@ -434,7 +434,7 @@ "container_name": "nextcloud-aio-fulltextsearch", "depends_on": [], "displayName": "Fulltextsearch", - "containerName": "nextcloud/aio-fulltextsearch", + "image": "nextcloud/aio-fulltextsearch", "ports": [], "internalPorts": [ "9200" diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 3e2f21fd..8266125c 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -179,7 +179,7 @@ class ContainerDefinitionFetcher $containers[] = new Container( $entry['container_name'], $entry['displayName'], - $entry['containerName'], + $entry['image'], $entry['restartPolicy'], $entry['maxShutdownTime'], $ports, From b13cb77ce20f421ed9a59a16f23d47e76e913524 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:48:24 +0100 Subject: [PATCH 0282/3949] rename environmentVariables to environment Signed-off-by: Simon L --- manual-install/update-yaml.sh | 1 - php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 3b82bcaf..1a9cdc71 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -19,7 +19,6 @@ cd manual-install || exit sed -i "s|'||g" containers.yml sed -i 's|production:|services:|' containers.yml sed -i 's|restartPolicy:|restart:|' containers.yml -sed -i 's|environmentVariables:|environment:|' containers.yml sed -i '/displayName:/d' containers.yml sed -i 's|maxShutdownTime:|stop_grace_period:|' containers.yml sed -i '/stop_grace_period:/s/$/s/' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index ba355dbe..4d252186 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -23,7 +23,7 @@ "displayName": { "type": "string" }, - "environmentVariables": { + "environment": { "type": "array", "items": { "type": "string" diff --git a/php/containers.json b/php/containers.json index a0a9a26e..aebac146 100644 --- a/php/containers.json +++ b/php/containers.json @@ -17,7 +17,7 @@ "%APACHE_PORT%" ], "secrets": [], - "environmentVariables": [ + "environment": [ "NC_DOMAIN=%NC_DOMAIN%", "NEXTCLOUD_HOST=nextcloud-aio-nextcloud", "COLLABORA_HOST=nextcloud-aio-collabora", @@ -67,7 +67,7 @@ "writeable": true } ], - "environmentVariables": [ + "environment": [ "POSTGRES_PASSWORD=%DATABASE_PASSWORD%", "POSTGRES_DB=nextcloud_database", "POSTGRES_USER=nextcloud", @@ -121,7 +121,7 @@ "writeable": false } ], - "environmentVariables": [ + "environment": [ "POSTGRES_HOST=nextcloud-aio-database", "POSTGRES_PASSWORD=%DATABASE_PASSWORD%", "POSTGRES_DB=nextcloud_database", @@ -174,7 +174,7 @@ "internalPorts": [ "6379" ], - "environmentVariables": [ + "environment": [ "REDIS_HOST_PASSWORD=%REDIS_PASSWORD%", "TZ=%TIMEZONE%" ], @@ -201,7 +201,7 @@ "internalPorts": [ "9980" ], - "environmentVariables": [ + "environment": [ "aliasgroup1=https://%NC_DOMAIN%:443", "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true %COLLABORA_SECCOMP_POLICY%", "dictionaries=%COLLABORA_DICTIONARIES%", @@ -230,7 +230,7 @@ "internalPorts": [ "%TALK_PORT%" ], - "environmentVariables": [ + "environment": [ "NC_DOMAIN=%NC_DOMAIN%", "TURN_SECRET=%TURN_SECRET%", "SIGNALING_SECRET=%SIGNALING_SECRET%", @@ -254,7 +254,7 @@ "image": "nextcloud/aio-borgbackup", "ports": [], "internalPorts": [], - "environmentVariables": [ + "environment": [ "BORG_PASSWORD=%BORGBACKUP_PASSWORD%", "BORG_MODE=%BORGBACKUP_MODE%", "SELECTED_RESTORE_TIME=%SELECTED_RESTORE_TIME%", @@ -327,7 +327,7 @@ "image": "nextcloud/aio-watchtower", "ports": [], "internalPorts": [], - "environmentVariables": [ + "environment": [ "CONTAINER_TO_UPDATE=nextcloud-aio-mastercontainer" ], "volumes": [ @@ -350,7 +350,7 @@ "%APACHE_PORT%/tcp" ], "internalPorts": [], - "environmentVariables": [ + "environment": [ "INSTANCE_ID=%INSTANCE_ID%", "APACHE_PORT=%APACHE_PORT%" ], @@ -370,7 +370,7 @@ "internalPorts": [ "3310" ], - "environmentVariables": [ + "environment": [ "TZ=%TIMEZONE%", "CLAMD_STARTUP_TIMEOUT=90" ], @@ -394,7 +394,7 @@ "internalPorts": [ "80" ], - "environmentVariables": [ + "environment": [ "TZ=%TIMEZONE%", "JWT_ENABLED=true", "JWT_HEADER=AuthorizationJwt", @@ -422,7 +422,7 @@ "internalPorts": [ "9000" ], - "environmentVariables": [ + "environment": [ "TZ=%TIMEZONE%" ], "volumes": [], @@ -439,7 +439,7 @@ "internalPorts": [ "9200" ], - "environmentVariables": [ + "environment": [ "TZ=%TIMEZONE%", "discovery.type=single-node", "ES_JAVA_OPTS=-Xms1024M -Xmx1024M" diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 8266125c..d4244566 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -172,7 +172,7 @@ class ContainerDefinitionFetcher } $variables = new ContainerEnvironmentVariables(); - foreach ($entry['environmentVariables'] as $value) { + foreach ($entry['environment'] as $value) { $variables->AddVariable($value); } From 5c444472c7fe32f188b8a58a32b776cbcc6694a3 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:50:17 +0100 Subject: [PATCH 0283/3949] rename maxShutdownTime to stop_grace_period Signed-off-by: Simon L --- manual-install/update-yaml.sh | 1 - php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 1a9cdc71..66586964 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -20,7 +20,6 @@ sed -i "s|'||g" containers.yml sed -i 's|production:|services:|' containers.yml sed -i 's|restartPolicy:|restart:|' containers.yml sed -i '/displayName:/d' containers.yml -sed -i 's|maxShutdownTime:|stop_grace_period:|' containers.yml sed -i '/stop_grace_period:/s/$/s/' containers.yml sed -i '/: \[\]/d' containers.yml sed -i 's|- name: |- |' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index 4d252186..43b5dd40 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -38,7 +38,7 @@ "type": "string" } }, - "maxShutdownTime": { + "stop_grace_period": { "type": "integer" }, "ports": { diff --git a/php/containers.json b/php/containers.json index aebac146..31b51adc 100644 --- a/php/containers.json +++ b/php/containers.json @@ -40,7 +40,7 @@ "writeable": true } ], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -74,7 +74,7 @@ "TZ=%TIMEZONE%", "PGTZ=%TIMEZONE%" ], - "maxShutdownTime": 1800, + "stop_grace_period": 1800, "restartPolicy": "unless-stopped" }, { @@ -162,7 +162,7 @@ "ADDITIONAL_APKS=%NEXTCLOUD_ADDITIONAL_APKS%", "ADDITIONAL_PHP_EXTENSIONS=%NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS%" ], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -189,7 +189,7 @@ "REDIS_PASSWORD", "ONLYOFFICE_SECRET" ], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -215,7 +215,7 @@ } ], "secrets": [], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -244,7 +244,7 @@ "SIGNALING_SECRET", "JANUS_API_KEY" ], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -317,7 +317,7 @@ "secrets": [ "BORGBACKUP_PASSWORD" ], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "" }, { @@ -338,7 +338,7 @@ } ], "secrets": [], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "" }, { @@ -358,7 +358,7 @@ "secrets": [ "INSTANCE_ID" ], - "maxShutdownTime": 1, + "stop_grace_period": 1, "restartPolicy": "" }, { @@ -382,7 +382,7 @@ } ], "secrets": [], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -410,7 +410,7 @@ "secrets": [ "ONLYOFFICE_SECRET" ], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -427,7 +427,7 @@ ], "volumes": [], "secrets": [], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" }, { @@ -452,7 +452,7 @@ } ], "secrets": [], - "maxShutdownTime": 10, + "stop_grace_period": 10, "restartPolicy": "unless-stopped" } ] diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index d4244566..a144f641 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -181,7 +181,7 @@ class ContainerDefinitionFetcher $entry['displayName'], $entry['image'], $entry['restartPolicy'], - $entry['maxShutdownTime'], + $entry['stop_grace_period'], $ports, $internalPorts, $volumes, From 1e78d729c4487d428bf553e0cd9c77b59db3c3d6 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:52:01 +0100 Subject: [PATCH 0284/3949] rename restartPolicy to restart Signed-off-by: Simon L --- manual-install/update-yaml.sh | 1 - php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 66586964..4589ce23 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -18,7 +18,6 @@ echo "$OUTPUT" | yq -P > ./manual-install/containers.yml cd manual-install || exit sed -i "s|'||g" containers.yml sed -i 's|production:|services:|' containers.yml -sed -i 's|restartPolicy:|restart:|' containers.yml sed -i '/displayName:/d' containers.yml sed -i '/stop_grace_period:/s/$/s/' containers.yml sed -i '/: \[\]/d' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index 43b5dd40..34e5f817 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -47,7 +47,7 @@ "type": "string" } }, - "restartPolicy": { + "restart": { "type": "string" }, "secrets": { diff --git a/php/containers.json b/php/containers.json index 31b51adc..a2cfa57b 100644 --- a/php/containers.json +++ b/php/containers.json @@ -41,7 +41,7 @@ } ], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-database", @@ -75,7 +75,7 @@ "PGTZ=%TIMEZONE%" ], "stop_grace_period": 1800, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-nextcloud", @@ -163,7 +163,7 @@ "ADDITIONAL_PHP_EXTENSIONS=%NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS%" ], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-redis", @@ -190,7 +190,7 @@ "ONLYOFFICE_SECRET" ], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-collabora", @@ -216,7 +216,7 @@ ], "secrets": [], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-talk", @@ -245,7 +245,7 @@ "JANUS_API_KEY" ], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-borgbackup", @@ -318,7 +318,7 @@ "BORGBACKUP_PASSWORD" ], "stop_grace_period": 10, - "restartPolicy": "" + "restart": "" }, { "container_name": "nextcloud-aio-watchtower", @@ -339,7 +339,7 @@ ], "secrets": [], "stop_grace_period": 10, - "restartPolicy": "" + "restart": "" }, { "depends_on": [], @@ -359,7 +359,7 @@ "INSTANCE_ID" ], "stop_grace_period": 1, - "restartPolicy": "" + "restart": "" }, { "container_name": "nextcloud-aio-clamav", @@ -383,7 +383,7 @@ ], "secrets": [], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-onlyoffice", @@ -411,7 +411,7 @@ "ONLYOFFICE_SECRET" ], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-imaginary", @@ -428,7 +428,7 @@ "volumes": [], "secrets": [], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" }, { "container_name": "nextcloud-aio-fulltextsearch", @@ -453,7 +453,7 @@ ], "secrets": [], "stop_grace_period": 10, - "restartPolicy": "unless-stopped" + "restart": "unless-stopped" } ] } diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index a144f641..60088f42 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -180,7 +180,7 @@ class ContainerDefinitionFetcher $entry['container_name'], $entry['displayName'], $entry['image'], - $entry['restartPolicy'], + $entry['restart'], $entry['stop_grace_period'], $ports, $internalPorts, From 3c57b2db56350429968e9e8b1f0d573a11a6705b Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:55:54 +0100 Subject: [PATCH 0285/3949] rename displayName to display_name Signed-off-by: Simon L --- manual-install/update-yaml.sh | 2 +- php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 4589ce23..4cccac2a 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -18,7 +18,7 @@ echo "$OUTPUT" | yq -P > ./manual-install/containers.yml cd manual-install || exit sed -i "s|'||g" containers.yml sed -i 's|production:|services:|' containers.yml -sed -i '/displayName:/d' containers.yml +sed -i '/display_name:/d' containers.yml sed -i '/stop_grace_period:/s/$/s/' containers.yml sed -i '/: \[\]/d' containers.yml sed -i 's|- name: |- |' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index 34e5f817..e654eef0 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -20,7 +20,7 @@ "type": "string" } }, - "displayName": { + "display_name": { "type": "string" }, "environment": { diff --git a/php/containers.json b/php/containers.json index a2cfa57b..2e7a9d75 100644 --- a/php/containers.json +++ b/php/containers.json @@ -8,7 +8,7 @@ "nextcloud-aio-talk", "nextcloud-aio-nextcloud" ], - "displayName": "Apache", + "display_name": "Apache", "image": "nextcloud/aio-apache", "ports": [ "%APACHE_PORT%/tcp" @@ -46,7 +46,7 @@ { "container_name": "nextcloud-aio-database", "depends_on": [], - "displayName": "Database", + "display_name": "Database", "image": "nextcloud/aio-postgresql", "ports": [], "internalPorts": [ @@ -86,7 +86,7 @@ "nextcloud-aio-fulltextsearch", "nextcloud-aio-imaginary" ], - "displayName": "Nextcloud", + "display_name": "Nextcloud", "image": "nextcloud/aio-nextcloud", "ports": [], "internalPorts": [ @@ -168,7 +168,7 @@ { "container_name": "nextcloud-aio-redis", "depends_on": [], - "displayName": "Redis", + "display_name": "Redis", "image": "nextcloud/aio-redis", "ports": [], "internalPorts": [ @@ -195,7 +195,7 @@ { "container_name": "nextcloud-aio-collabora", "depends_on": [], - "displayName": "Collabora", + "display_name": "Collabora", "image": "nextcloud/aio-collabora", "ports": [], "internalPorts": [ @@ -221,7 +221,7 @@ { "container_name": "nextcloud-aio-talk", "depends_on": [], - "displayName": "Talk", + "display_name": "Talk", "image": "nextcloud/aio-talk", "ports": [ "%TALK_PORT%/tcp", @@ -250,7 +250,7 @@ { "container_name": "nextcloud-aio-borgbackup", "depends_on": [], - "displayName": "Borgbackup", + "display_name": "Borgbackup", "image": "nextcloud/aio-borgbackup", "ports": [], "internalPorts": [], @@ -323,7 +323,7 @@ { "container_name": "nextcloud-aio-watchtower", "depends_on": [], - "displayName": "Watchtower", + "display_name": "Watchtower", "image": "nextcloud/aio-watchtower", "ports": [], "internalPorts": [], @@ -344,7 +344,7 @@ { "depends_on": [], "container_name": "nextcloud-aio-domaincheck", - "displayName": "Domaincheck", + "display_name": "Domaincheck", "image": "nextcloud/aio-domaincheck", "ports": [ "%APACHE_PORT%/tcp" @@ -364,7 +364,7 @@ { "container_name": "nextcloud-aio-clamav", "depends_on": [], - "displayName": "ClamAV", + "display_name": "ClamAV", "image": "nextcloud/aio-clamav", "ports": [], "internalPorts": [ @@ -388,7 +388,7 @@ { "container_name": "nextcloud-aio-onlyoffice", "depends_on": [], - "displayName": "OnlyOffice", + "display_name": "OnlyOffice", "image": "nextcloud/aio-onlyoffice", "ports": [], "internalPorts": [ @@ -416,7 +416,7 @@ { "container_name": "nextcloud-aio-imaginary", "depends_on": [], - "displayName": "Imaginary", + "display_name": "Imaginary", "image": "nextcloud/aio-imaginary", "ports": [], "internalPorts": [ @@ -433,7 +433,7 @@ { "container_name": "nextcloud-aio-fulltextsearch", "depends_on": [], - "displayName": "Fulltextsearch", + "display_name": "Fulltextsearch", "image": "nextcloud/aio-fulltextsearch", "ports": [], "internalPorts": [ diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 60088f42..2adce34b 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -178,7 +178,7 @@ class ContainerDefinitionFetcher $containers[] = new Container( $entry['container_name'], - $entry['displayName'], + $entry['display_name'], $entry['image'], $entry['restart'], $entry['stop_grace_period'], From 7a9a452f4576fa402dc969c309266e291338e2cf Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 00:58:09 +0100 Subject: [PATCH 0286/3949] rename production to services Signed-off-by: Simon L --- manual-install/update-yaml.sh | 11 +++++------ php/containers-schema.json | 2 +- php/containers.json | 2 +- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 4cccac2a..a0722af4 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -5,11 +5,11 @@ sed -i 's|","location":"|:|g' /tmp/containers.json sed -i 's|","writeable":false|:ro"|g' /tmp/containers.json sed -i 's|","writeable":true|:rw"|g' /tmp/containers.json OUTPUT="$(cat /tmp/containers.json)" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[].internalPorts)')" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[].secrets)')" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.container_name == "nextcloud-aio-watchtower"))')" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.container_name == "nextcloud-aio-domaincheck"))')" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.production[] | select(.container_name == "nextcloud-aio-borgbackup"))')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].internalPorts)')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].secrets)')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-watchtower"))')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-domaincheck"))')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-borgbackup"))')" snap install yq mkdir -p ./manual-install @@ -17,7 +17,6 @@ echo "$OUTPUT" | yq -P > ./manual-install/containers.yml cd manual-install || exit sed -i "s|'||g" containers.yml -sed -i 's|production:|services:|' containers.yml sed -i '/display_name:/d' containers.yml sed -i '/stop_grace_period:/s/$/s/' containers.yml sed -i '/: \[\]/d' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index e654eef0..ced642c8 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -4,7 +4,7 @@ "additionalProperties": false, "minProperties": 1, "properties": { - "production": { + "services": { "type": "array", "items": { "type": "object", diff --git a/php/containers.json b/php/containers.json index 2e7a9d75..027b4758 100644 --- a/php/containers.json +++ b/php/containers.json @@ -1,5 +1,5 @@ { - "production": [ + "services": [ { "container_name": "nextcloud-aio-apache", "depends_on": [ diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 2adce34b..7d5ac46a 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -48,7 +48,7 @@ class ContainerDefinitionFetcher $data = json_decode(file_get_contents(__DIR__ . '/../containers.json'), true); $containers = []; - foreach ($data['production'] as $entry) { + foreach ($data['services'] as $entry) { if ($entry['container_name'] === 'nextcloud-aio-clamav') { if (!$this->configurationManager->isClamavEnabled()) { continue; From 53065b5631d282f36822f52e417ece4a340f2ad2 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 01:03:17 +0100 Subject: [PATCH 0287/3949] rename internalPorts to internal_ports Signed-off-by: Simon L --- manual-install/update-yaml.sh | 2 +- php/containers-schema.json | 2 +- php/containers.json | 26 +++++++++++++------------- php/src/ContainerDefinitionFetcher.php | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index a0722af4..9f6836a9 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -5,7 +5,7 @@ sed -i 's|","location":"|:|g' /tmp/containers.json sed -i 's|","writeable":false|:ro"|g' /tmp/containers.json sed -i 's|","writeable":true|:rw"|g' /tmp/containers.json OUTPUT="$(cat /tmp/containers.json)" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].internalPorts)')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].internal_ports)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].secrets)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-watchtower"))')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-domaincheck"))')" diff --git a/php/containers-schema.json b/php/containers-schema.json index ced642c8..dfab68c3 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -32,7 +32,7 @@ "container_name": { "type": "string" }, - "internalPorts": { + "internal_ports": { "type": "array", "items": { "type": "string" diff --git a/php/containers.json b/php/containers.json index 027b4758..2ff1b4ed 100644 --- a/php/containers.json +++ b/php/containers.json @@ -13,7 +13,7 @@ "ports": [ "%APACHE_PORT%/tcp" ], - "internalPorts": [ + "internal_ports": [ "%APACHE_PORT%" ], "secrets": [], @@ -49,7 +49,7 @@ "display_name": "Database", "image": "nextcloud/aio-postgresql", "ports": [], - "internalPorts": [ + "internal_ports": [ "5432" ], "secrets": [ @@ -89,7 +89,7 @@ "display_name": "Nextcloud", "image": "nextcloud/aio-nextcloud", "ports": [], - "internalPorts": [ + "internal_ports": [ "9000" ], "secrets": [ @@ -171,7 +171,7 @@ "display_name": "Redis", "image": "nextcloud/aio-redis", "ports": [], - "internalPorts": [ + "internal_ports": [ "6379" ], "environment": [ @@ -198,7 +198,7 @@ "display_name": "Collabora", "image": "nextcloud/aio-collabora", "ports": [], - "internalPorts": [ + "internal_ports": [ "9980" ], "environment": [ @@ -227,7 +227,7 @@ "%TALK_PORT%/tcp", "%TALK_PORT%/udp" ], - "internalPorts": [ + "internal_ports": [ "%TALK_PORT%" ], "environment": [ @@ -253,7 +253,7 @@ "display_name": "Borgbackup", "image": "nextcloud/aio-borgbackup", "ports": [], - "internalPorts": [], + "internal_ports": [], "environment": [ "BORG_PASSWORD=%BORGBACKUP_PASSWORD%", "BORG_MODE=%BORGBACKUP_MODE%", @@ -326,7 +326,7 @@ "display_name": "Watchtower", "image": "nextcloud/aio-watchtower", "ports": [], - "internalPorts": [], + "internal_ports": [], "environment": [ "CONTAINER_TO_UPDATE=nextcloud-aio-mastercontainer" ], @@ -349,7 +349,7 @@ "ports": [ "%APACHE_PORT%/tcp" ], - "internalPorts": [], + "internal_ports": [], "environment": [ "INSTANCE_ID=%INSTANCE_ID%", "APACHE_PORT=%APACHE_PORT%" @@ -367,7 +367,7 @@ "display_name": "ClamAV", "image": "nextcloud/aio-clamav", "ports": [], - "internalPorts": [ + "internal_ports": [ "3310" ], "environment": [ @@ -391,7 +391,7 @@ "display_name": "OnlyOffice", "image": "nextcloud/aio-onlyoffice", "ports": [], - "internalPorts": [ + "internal_ports": [ "80" ], "environment": [ @@ -419,7 +419,7 @@ "display_name": "Imaginary", "image": "nextcloud/aio-imaginary", "ports": [], - "internalPorts": [ + "internal_ports": [ "9000" ], "environment": [ @@ -436,7 +436,7 @@ "display_name": "Fulltextsearch", "image": "nextcloud/aio-fulltextsearch", "ports": [], - "internalPorts": [ + "internal_ports": [ "9200" ], "environment": [ diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 7d5ac46a..0d93f4b5 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -88,7 +88,7 @@ class ContainerDefinitionFetcher } $internalPorts = new ContainerInternalPorts(); - foreach ($entry['internalPorts'] as $internalPort) { + foreach ($entry['internal_ports'] as $internalPort) { if($internalPort === '%APACHE_PORT%') { $internalPort = $this->configurationManager->GetApachePort(); } elseif($internalPort === '%TALK_PORT%') { From 54f61eba68c0cc8e09a78c52b2f3154f4b0e2d33 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 01:40:37 +0100 Subject: [PATCH 0288/3949] internal_ports should be a string and not an array Signed-off-by: Simon L --- manual-install/update-yaml.sh | 2 +- php/containers-schema.json | 7 +-- php/containers.json | 46 ++++++-------------- php/psalm-baseline.xml | 2 +- php/src/Container/Container.php | 6 +-- php/src/Container/ContainerInternalPorts.php | 19 -------- php/src/ContainerDefinitionFetcher.php | 15 +++---- php/src/Docker/DockerActionManager.php | 16 +++---- 8 files changed, 32 insertions(+), 81 deletions(-) delete mode 100644 php/src/Container/ContainerInternalPorts.php diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 9f6836a9..ad62aaa9 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -5,7 +5,7 @@ sed -i 's|","location":"|:|g' /tmp/containers.json sed -i 's|","writeable":false|:ro"|g' /tmp/containers.json sed -i 's|","writeable":true|:rw"|g' /tmp/containers.json OUTPUT="$(cat /tmp/containers.json)" -OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].internal_ports)')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].internal_port)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].secrets)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-watchtower"))')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[] | select(.container_name == "nextcloud-aio-domaincheck"))')" diff --git a/php/containers-schema.json b/php/containers-schema.json index dfab68c3..1fceab26 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -32,11 +32,8 @@ "container_name": { "type": "string" }, - "internal_ports": { - "type": "array", - "items": { - "type": "string" - } + "internal_port": { + "type": "string" }, "stop_grace_period": { "type": "integer" diff --git a/php/containers.json b/php/containers.json index 2ff1b4ed..2f49c6de 100644 --- a/php/containers.json +++ b/php/containers.json @@ -13,9 +13,7 @@ "ports": [ "%APACHE_PORT%/tcp" ], - "internal_ports": [ - "%APACHE_PORT%" - ], + "internal_port": "%APACHE_PORT%", "secrets": [], "environment": [ "NC_DOMAIN=%NC_DOMAIN%", @@ -49,9 +47,7 @@ "display_name": "Database", "image": "nextcloud/aio-postgresql", "ports": [], - "internal_ports": [ - "5432" - ], + "internal_port": "5432", "secrets": [ "DATABASE_PASSWORD" ], @@ -89,9 +85,7 @@ "display_name": "Nextcloud", "image": "nextcloud/aio-nextcloud", "ports": [], - "internal_ports": [ - "9000" - ], + "internal_port": "9000", "secrets": [ "DATABASE_PASSWORD", "REDIS_PASSWORD", @@ -171,9 +165,7 @@ "display_name": "Redis", "image": "nextcloud/aio-redis", "ports": [], - "internal_ports": [ - "6379" - ], + "internal_port": "6379", "environment": [ "REDIS_HOST_PASSWORD=%REDIS_PASSWORD%", "TZ=%TIMEZONE%" @@ -198,9 +190,7 @@ "display_name": "Collabora", "image": "nextcloud/aio-collabora", "ports": [], - "internal_ports": [ - "9980" - ], + "internal_port": "9980", "environment": [ "aliasgroup1=https://%NC_DOMAIN%:443", "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true %COLLABORA_SECCOMP_POLICY%", @@ -227,9 +217,7 @@ "%TALK_PORT%/tcp", "%TALK_PORT%/udp" ], - "internal_ports": [ - "%TALK_PORT%" - ], + "internal_port": "%TALK_PORT%", "environment": [ "NC_DOMAIN=%NC_DOMAIN%", "TURN_SECRET=%TURN_SECRET%", @@ -253,7 +241,7 @@ "display_name": "Borgbackup", "image": "nextcloud/aio-borgbackup", "ports": [], - "internal_ports": [], + "internal_port": "", "environment": [ "BORG_PASSWORD=%BORGBACKUP_PASSWORD%", "BORG_MODE=%BORGBACKUP_MODE%", @@ -326,7 +314,7 @@ "display_name": "Watchtower", "image": "nextcloud/aio-watchtower", "ports": [], - "internal_ports": [], + "internal_port": "", "environment": [ "CONTAINER_TO_UPDATE=nextcloud-aio-mastercontainer" ], @@ -349,7 +337,7 @@ "ports": [ "%APACHE_PORT%/tcp" ], - "internal_ports": [], + "internal_port": "", "environment": [ "INSTANCE_ID=%INSTANCE_ID%", "APACHE_PORT=%APACHE_PORT%" @@ -367,9 +355,7 @@ "display_name": "ClamAV", "image": "nextcloud/aio-clamav", "ports": [], - "internal_ports": [ - "3310" - ], + "internal_port": "3310", "environment": [ "TZ=%TIMEZONE%", "CLAMD_STARTUP_TIMEOUT=90" @@ -391,9 +377,7 @@ "display_name": "OnlyOffice", "image": "nextcloud/aio-onlyoffice", "ports": [], - "internal_ports": [ - "80" - ], + "internal_port": "80", "environment": [ "TZ=%TIMEZONE%", "JWT_ENABLED=true", @@ -419,9 +403,7 @@ "display_name": "Imaginary", "image": "nextcloud/aio-imaginary", "ports": [], - "internal_ports": [ - "9000" - ], + "internal_port": "9000", "environment": [ "TZ=%TIMEZONE%" ], @@ -436,9 +418,7 @@ "display_name": "Fulltextsearch", "image": "nextcloud/aio-fulltextsearch", "ports": [], - "internal_ports": [ - "9200" - ], + "internal_port": "9200", "environment": [ "TZ=%TIMEZONE%", "discovery.type=single-node", diff --git a/php/psalm-baseline.xml b/php/psalm-baseline.xml index e62c34f0..ce18679f 100644 --- a/php/psalm-baseline.xml +++ b/php/psalm-baseline.xml @@ -46,7 +46,7 @@ $internalPort - $container->GetInternalPorts() !== null + $container->GetInternalPort() !== null diff --git a/php/src/Container/Container.php b/php/src/Container/Container.php index c1330da3..9697911b 100644 --- a/php/src/Container/Container.php +++ b/php/src/Container/Container.php @@ -14,7 +14,7 @@ class Container { private string $restartPolicy; private int $maxShutdownTime; private ContainerPorts $ports; - private ContainerInternalPorts $internalPorts; + private string $internalPorts; private ContainerVolumes $volumes; private ContainerEnvironmentVariables $containerEnvironmentVariables; /** @var string[] */ @@ -30,7 +30,7 @@ class Container { string $restartPolicy, int $maxShutdownTime, ContainerPorts $ports, - ContainerInternalPorts $internalPorts, + string $internalPorts, ContainerVolumes $volumes, ContainerEnvironmentVariables $containerEnvironmentVariables, array $dependsOn, @@ -79,7 +79,7 @@ class Container { return $this->ports; } - public function GetInternalPorts() : ContainerInternalPorts { + public function GetInternalPort() : string { return $this->internalPorts; } diff --git a/php/src/Container/ContainerInternalPorts.php b/php/src/Container/ContainerInternalPorts.php deleted file mode 100644 index fb0716bf..00000000 --- a/php/src/Container/ContainerInternalPorts.php +++ /dev/null @@ -1,19 +0,0 @@ -internalPorts[] = $internalPort; - } - - /** - * @return string[] - */ - public function GetInternalPorts() : array { - return $this->internalPorts; - } -} diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 0d93f4b5..8a5341bf 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -5,7 +5,6 @@ namespace AIO; use AIO\Container\Container; use AIO\Container\ContainerEnvironmentVariables; use AIO\Container\ContainerPorts; -use AIO\Container\ContainerInternalPorts; use AIO\Container\ContainerVolume; use AIO\Container\ContainerVolumes; use AIO\Container\State\RunningState; @@ -87,14 +86,10 @@ class ContainerDefinitionFetcher $ports->AddPort($port); } - $internalPorts = new ContainerInternalPorts(); - foreach ($entry['internal_ports'] as $internalPort) { - if($internalPort === '%APACHE_PORT%') { - $internalPort = $this->configurationManager->GetApachePort(); - } elseif($internalPort === '%TALK_PORT%') { - $internalPort = $this->configurationManager->GetTalkPort(); - } - $internalPorts->AddInternalPort($internalPort); + if($entry['internal_port'] === '%APACHE_PORT%') { + $entry['internal_port'] = $this->configurationManager->GetApachePort(); + } elseif($entry['internal_port'] === '%TALK_PORT%') { + $entry['internal_port'] = $this->configurationManager->GetTalkPort(); } $volumes = new ContainerVolumes(); @@ -183,7 +178,7 @@ class ContainerDefinitionFetcher $entry['restart'], $entry['stop_grace_period'], $ports, - $internalPorts, + $entry['internal_port'], $volumes, $variables, $dependsOn, diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 9550dd44..eed07c35 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -124,15 +124,13 @@ class DockerActionManager } $containerName = $container->GetIdentifier(); - if ($container->GetInternalPorts() !== null) { - foreach($container->GetInternalPorts()->GetInternalPorts() as $internalPort) { - $connection = @fsockopen($containerName, $internalPort, $errno, $errstr, 0.1); - if ($connection) { - fclose($connection); - return new RunningState(); - } else { - return new StartingState(); - } + if ($container->GetInternalPort() !== "") { + $connection = @fsockopen($containerName, (int)$container->GetInternalPort(), $errno, $errstr, 0.1); + if ($connection) { + fclose($connection); + return new RunningState(); + } else { + return new StartingState(); } } else { return new RunningState(); From 27bd5ce1a4ce26d0c7ce5d54daaed92c26f4caeb Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 02:26:32 +0100 Subject: [PATCH 0289/3949] secrets should only get generated if defined in secrets of container.json Signed-off-by: Simon L --- php/public/index.php | 4 ++-- php/src/Data/ConfigurationManager.php | 13 +++++++++++-- php/src/Docker/DockerActionManager.php | 10 +++++++++- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index d469264b..aaf829c8 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -77,9 +77,9 @@ $app->get('/containers', function ($request, $response, $args) use ($container) return $view->render($response, 'containers.twig', [ 'domain' => $configurationManager->GetDomain(), 'borg_backup_host_location' => $configurationManager->GetBorgBackupHostLocation(), - 'nextcloud_password' => $configurationManager->GetSecret('NEXTCLOUD_PASSWORD'), + 'nextcloud_password' => $configurationManager->GetAndGenerateSecret('NEXTCLOUD_PASSWORD'), 'containers' => (new \AIO\ContainerDefinitionFetcher($container->get(\AIO\Data\ConfigurationManager::class), $container))->FetchDefinition(), - 'borgbackup_password' => $configurationManager->GetSecret('BORGBACKUP_PASSWORD'), + 'borgbackup_password' => $configurationManager->GetAndGenerateSecret('BORGBACKUP_PASSWORD'), 'is_mastercontainer_update_available' => $dockerActionManger->IsMastercontainerUpdateAvailable(), 'has_backup_run_once' => $configurationManager->hasBackupRunOnce(), 'is_backup_container_running' => $dockerActionManger->isBackupContainerRunning(), diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 9d21922e..0a265fd9 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -32,7 +32,7 @@ class ConfigurationManager $this->WriteConfig($config); } - public function GetSecret(string $secretId) : string { + public function GetAndGenerateSecret(string $secretId) : string { $config = $this->GetConfig(); if(!isset($config['secrets'][$secretId])) { $config['secrets'][$secretId] = bin2hex(random_bytes(24)); @@ -46,6 +46,15 @@ class ConfigurationManager return $config['secrets'][$secretId]; } + public function GetSecret(string $secretId) : string { + $config = $this->GetConfig(); + if(!isset($config['secrets'][$secretId])) { + $config['secrets'][$secretId] = ""; + } + + return $config['secrets'][$secretId]; + } + private function DoubleSafeBackupSecret(string $borgBackupPassword) : void { file_put_contents(DataConst::GetBackupSecretFile(), $borgBackupPassword); } @@ -269,7 +278,7 @@ class ConfigurationManager } // Get Instance ID - $instanceID = $this->GetSecret('INSTANCE_ID'); + $instanceID = $this->GetAndGenerateSecret('INSTANCE_ID'); // set protocol if ($port !== '443') { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 9550dd44..bf357981 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -230,6 +230,10 @@ class DockerActionManager $requestBody['HostConfig']['Binds'] = $volumes; } + foreach($container->GetSecrets() as $secret) { + $this->configurationManager->GetAndGenerateSecret($secret); + } + $envs = $container->GetEnvironmentVariables()->GetVariables(); foreach($envs as $key => $env) { $patterns = ['/%(.*)%/']; @@ -337,7 +341,11 @@ class DockerActionManager } elseif ($out[1] === 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS') { $replacements[1] = $this->configurationManager->GetNextcloudAdditionalPhpExtensions(); } else { - $replacements[1] = $this->configurationManager->GetSecret($out[1]); + $secret = $this->configurationManager->GetSecret($out[1]); + if ($secret === "") { + throw new \Exception("The secret " . $out[1] . " is empty. Cannot substitute its value. Pleas check if it is defined in secrets of containers.json."); + } + $replacements[1] = $secret; } $envs[$key] = preg_replace($patterns, $replacements, $env); From 117c3de7c559eef2898b49139e9c5e10bea5104c Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 02:45:32 +0100 Subject: [PATCH 0290/3949] add items type for secrets Signed-off-by: Simon L --- php/containers-schema.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php/containers-schema.json b/php/containers-schema.json index 1fceab26..b13da609 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -48,7 +48,10 @@ "type": "string" }, "secrets": { - "type": "array" + "type": "array", + "items": { + "type": "string" + } }, "volumes": { "type": "array", From 2fd750c8b255ff2933fa34ba2e8db93338fe8356 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 25 Dec 2022 15:56:37 +0100 Subject: [PATCH 0291/3949] allow to hide containers from the interface via display_name Signed-off-by: Simon L --- php/containers.json | 6 +++--- php/templates/containers.twig | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/php/containers.json b/php/containers.json index 2f49c6de..fb7fb679 100644 --- a/php/containers.json +++ b/php/containers.json @@ -238,7 +238,7 @@ { "container_name": "nextcloud-aio-borgbackup", "depends_on": [], - "display_name": "Borgbackup", + "display_name": "", "image": "nextcloud/aio-borgbackup", "ports": [], "internal_port": "", @@ -311,7 +311,7 @@ { "container_name": "nextcloud-aio-watchtower", "depends_on": [], - "display_name": "Watchtower", + "display_name": "", "image": "nextcloud/aio-watchtower", "ports": [], "internal_port": "", @@ -332,7 +332,7 @@ { "depends_on": [], "container_name": "nextcloud-aio-domaincheck", - "display_name": "Domaincheck", + "display_name": "", "image": "nextcloud/aio-domaincheck", "ports": [ "%APACHE_PORT%/tcp" diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 08484823..90989315 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -38,10 +38,10 @@ {% endif %} {% for container in containers %} - {% if container.GetIdentifier() not in ['nextcloud-aio-domaincheck', 'nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower'] and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %} + {% if container.GetDisplayName() != '' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %} {% set isAnyRunning = true %} {% endif %} - {% if container.GetIdentifier() not in ['nextcloud-aio-domaincheck', 'nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower'] and class(container.GetRestartingState()) == 'AIO\\Container\\State\\RestartingState' %} + {% if container.GetDisplayName() != '' and class(container.GetRestartingState()) == 'AIO\\Container\\State\\RestartingState' %} {% set isAnyRestarting = true %} {% endif %} {% if container.GetIdentifier() == 'nextcloud-aio-watchtower' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %} @@ -219,7 +219,7 @@