From a2f58952652b6dd8a7b97553ac8616a728319dae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 10:10:37 +0000 Subject: [PATCH] reuse: add SPDX headers to PHP source files, templates, and JS/CSS Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- php/domain-validator.php | 3 ++ php/get-configurable-aio-variables.sh | 3 ++ php/psalm.xml | 5 +++ php/public/automatic_reload.js | 3 ++ php/public/base_path.js | 3 ++ php/public/before-unload.js | 3 ++ php/public/click-handlers.js | 3 ++ php/public/containers-form-submit.js | 3 ++ php/public/disable-containers.js | 3 ++ php/public/forms.js | 3 ++ php/public/index.php | 3 ++ php/public/log-view.js | 3 ++ php/public/logs.css | 3 ++ php/public/scroll-into-view.js | 3 ++ php/public/second-tab-warning.js | 25 ++++++----- php/public/style.css | 3 ++ php/public/timezone.js | 3 ++ php/public/toggle-dark-mode.js | 3 ++ php/src/Auth/AuthManager.php | 3 ++ php/src/Auth/PasswordGenerator.php | 3 ++ php/src/Container/AioVariables.php | 3 ++ php/src/Container/Container.php | 3 ++ .../ContainerEnvironmentVariables.php | 3 ++ php/src/Container/ContainerPort.php | 3 ++ php/src/Container/ContainerPorts.php | 3 ++ php/src/Container/ContainerState.php | 3 ++ php/src/Container/ContainerVolume.php | 3 ++ php/src/Container/ContainerVolumes.php | 3 ++ php/src/Container/VersionState.php | 3 ++ php/src/ContainerDefinitionFetcher.php | 3 ++ .../Controller/ConfigurationController.php | 3 ++ php/src/Controller/DockerController.php | 3 ++ php/src/Controller/LoginController.php | 3 ++ php/src/Cron/BackupNotification.php | 3 ++ php/src/Cron/CheckBackup.php | 37 ++++++++-------- php/src/Cron/CheckFreeDiskSpace.php | 3 ++ php/src/Cron/CreateBackup.php | 37 ++++++++-------- php/src/Cron/OutdatedNotification.php | 3 ++ php/src/Cron/PullContainerImages.php | 3 ++ php/src/Cron/StartAndUpdateContainers.php | 43 ++++++++++--------- php/src/Cron/StartContainers.php | 43 ++++++++++--------- php/src/Cron/StopContainers.php | 37 ++++++++-------- php/src/Cron/UpdateMastercontainer.php | 37 ++++++++-------- php/src/Cron/UpdateNotification.php | 3 ++ php/src/Data/ConfigurationManager.php | 3 ++ php/src/Data/DataConst.php | 3 ++ .../InvalidSettingConfigurationException.php | 3 ++ php/src/Data/Setup.php | 3 ++ php/src/DependencyInjection.php | 3 ++ php/src/Docker/DockerActionManager.php | 3 ++ php/src/Docker/DockerHubManager.php | 3 ++ .../Docker/GitHubContainerRegistryManager.php | 3 ++ php/src/Middleware/AuthMiddleware.php | 3 ++ php/src/Twig/ClassExtension.php | 3 ++ php/src/Twig/CsrfExtension.php | 3 ++ php/templates/already-installed.twig | 3 ++ php/templates/components/container-state.twig | 3 ++ php/templates/containers.twig | 3 ++ php/templates/includes/aio-config.twig | 3 ++ php/templates/includes/aio-version.twig | 3 ++ php/templates/includes/backup-dirs.twig | 3 ++ .../includes/community-containers.twig | 3 ++ .../includes/optional-containers.twig | 3 ++ php/templates/layout.twig | 3 ++ php/templates/log.twig | 3 ++ php/templates/login.twig | 3 ++ php/templates/setup.twig | 3 ++ php/tests/playwright.config.js | 3 ++ php/tests/tests/initial-setup.spec.js | 3 ++ php/tests/tests/restore-instance.spec.js | 3 ++ 70 files changed, 331 insertions(+), 119 deletions(-) diff --git a/php/domain-validator.php b/php/domain-validator.php index 55fb110f..6e179b74 100644 --- a/php/domain-validator.php +++ b/php/domain-validator.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); $domain = ''; diff --git a/php/get-configurable-aio-variables.sh b/php/get-configurable-aio-variables.sh index 3093e1e0..42517a5f 100755 --- a/php/get-configurable-aio-variables.sh +++ b/php/get-configurable-aio-variables.sh @@ -1,3 +1,6 @@ #!/usr/bin/env bash +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + awk '/^ public [^f][^u][^n]/ { sub(/\$/, "", $3); print $3 }' src/Data/ConfigurationManager.php | sort diff --git a/php/psalm.xml b/php/psalm.xml index 576d82d2..2859f378 100644 --- a/php/psalm.xml +++ b/php/psalm.xml @@ -1,4 +1,9 @@ + + +// SPDX-License-Identifier: AGPL-3.0-only + window.addEventListener("load", function(event) { if (document.hasFocus()) { // hide reload button if the site reloads automatically diff --git a/php/public/base_path.js b/php/public/base_path.js index a55ed943..02a4a137 100644 --- a/php/public/base_path.js +++ b/php/public/base_path.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2025 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + document.addEventListener("DOMContentLoaded", function() { basePath = document.getElementById("base_path") if (basePath) { diff --git a/php/public/before-unload.js b/php/public/before-unload.js index 33c473bb..7f3a40a3 100644 --- a/php/public/before-unload.js +++ b/php/public/before-unload.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2022 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + window.addEventListener("beforeunload", function() { document.getElementById('overlay').classList.add('loading') }); \ No newline at end of file diff --git a/php/public/click-handlers.js b/php/public/click-handlers.js index 3e2f3a75..d8ba3c35 100644 --- a/php/public/click-handlers.js +++ b/php/public/click-handlers.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + document.addEventListener("DOMContentLoaded", () => { document.querySelectorAll('input[data-confirm]').forEach((element) => { element.addEventListener('click', (event) => { diff --git a/php/public/containers-form-submit.js b/php/public/containers-form-submit.js index 778430cb..912e258c 100644 --- a/php/public/containers-form-submit.js +++ b/php/public/containers-form-submit.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2025 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + document.addEventListener("DOMContentLoaded", function () { // Don't run if the expected form isn't present. if (document.getElementById('options-form') === null) { diff --git a/php/public/disable-containers.js b/php/public/disable-containers.js index 41c5cfe1..68663289 100644 --- a/php/public/disable-containers.js +++ b/php/public/disable-containers.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + document.addEventListener("DOMContentLoaded", function(event) { // Clamav let clamav = document.getElementById("clamav"); diff --git a/php/public/forms.js b/php/public/forms.js index b37fdcdb..4826917c 100644 --- a/php/public/forms.js +++ b/php/public/forms.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2021 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + "use strict"; (function (){ diff --git a/php/public/index.php b/php/public/index.php index 4c64ab31..e8aeefbd 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); // increase memory limit to 2GB diff --git a/php/public/log-view.js b/php/public/log-view.js index 4814ea8e..14b9b0fb 100644 --- a/php/public/log-view.js +++ b/php/public/log-view.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + class LogViewer { // Configure the interval in seconds for autoloading log data. autoloadIntervalSec = 5; diff --git a/php/public/logs.css b/php/public/logs.css index 04f6be1a..5c567063 100644 --- a/php/public/logs.css +++ b/php/public/logs.css @@ -1,3 +1,6 @@ +/* SPDX-FileCopyrightText: 2026 Nextcloud GmbH */ +/* SPDX-License-Identifier: AGPL-3.0-only */ + html, body { height: 100%; overflow: hidden; diff --git a/php/public/scroll-into-view.js b/php/public/scroll-into-view.js index 2c676911..a615b6eb 100644 --- a/php/public/scroll-into-view.js +++ b/php/public/scroll-into-view.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + const observer = new MutationObserver((records) => { const node = records[0]?.addedNodes[0]; // Text nodes also appear here but can't be scrolled to, so we have to check for the diff --git a/php/public/second-tab-warning.js b/php/public/second-tab-warning.js index 63abc18b..d01c3645 100644 --- a/php/public/second-tab-warning.js +++ b/php/public/second-tab-warning.js @@ -1,12 +1,15 @@ -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.') - } +// SPDX-FileCopyrightText: 2022 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + +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/public/style.css b/php/public/style.css index 9a8d17d7..84e04626 100644 --- a/php/public/style.css +++ b/php/public/style.css @@ -1,3 +1,6 @@ +/* SPDX-FileCopyrightText: 2021 Nextcloud GmbH */ +/* SPDX-License-Identifier: AGPL-3.0-only */ + :root { --color-nextcloud-blue: #0082c9; --color-nextcloud-logo: var(--color-nextcloud-blue); diff --git a/php/public/timezone.js b/php/public/timezone.js index cd926587..18e0817f 100644 --- a/php/public/timezone.js +++ b/php/public/timezone.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + document.addEventListener("DOMContentLoaded", function(event) { // timezone let timezone = document.getElementById("timezone"); diff --git a/php/public/toggle-dark-mode.js b/php/public/toggle-dark-mode.js index 44eff9ff..d05d3f74 100644 --- a/php/public/toggle-dark-mode.js +++ b/php/public/toggle-dark-mode.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + // Function to toggle theme function toggleTheme() { const currentTheme = document.documentElement.getAttribute('data-theme'); diff --git a/php/src/Auth/AuthManager.php b/php/src/Auth/AuthManager.php index 9d2718e0..5687e7e5 100644 --- a/php/src/Auth/AuthManager.php +++ b/php/src/Auth/AuthManager.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Auth; diff --git a/php/src/Auth/PasswordGenerator.php b/php/src/Auth/PasswordGenerator.php index a0c4785e..e7411979 100644 --- a/php/src/Auth/PasswordGenerator.php +++ b/php/src/Auth/PasswordGenerator.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Auth; diff --git a/php/src/Container/AioVariables.php b/php/src/Container/AioVariables.php index 9f19bbe7..4472b80b 100644 --- a/php/src/Container/AioVariables.php +++ b/php/src/Container/AioVariables.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/Container.php b/php/src/Container/Container.php index 6b6c5af9..d5de9a64 100644 --- a/php/src/Container/Container.php +++ b/php/src/Container/Container.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/ContainerEnvironmentVariables.php b/php/src/Container/ContainerEnvironmentVariables.php index 0b00b7c1..770edfa6 100644 --- a/php/src/Container/ContainerEnvironmentVariables.php +++ b/php/src/Container/ContainerEnvironmentVariables.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/ContainerPort.php b/php/src/Container/ContainerPort.php index a44e3455..7e86f92d 100644 --- a/php/src/Container/ContainerPort.php +++ b/php/src/Container/ContainerPort.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/ContainerPorts.php b/php/src/Container/ContainerPorts.php index 62dcf235..4e34b451 100644 --- a/php/src/Container/ContainerPorts.php +++ b/php/src/Container/ContainerPorts.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/ContainerState.php b/php/src/Container/ContainerState.php index 92f00f22..aa72109e 100644 --- a/php/src/Container/ContainerState.php +++ b/php/src/Container/ContainerState.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/ContainerVolume.php b/php/src/Container/ContainerVolume.php index a29d82e3..6dfee026 100644 --- a/php/src/Container/ContainerVolume.php +++ b/php/src/Container/ContainerVolume.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/ContainerVolumes.php b/php/src/Container/ContainerVolumes.php index c92c0fcc..f93b495f 100644 --- a/php/src/Container/ContainerVolumes.php +++ b/php/src/Container/ContainerVolumes.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/Container/VersionState.php b/php/src/Container/VersionState.php index b54dfbd3..fcb9cf91 100644 --- a/php/src/Container/VersionState.php +++ b/php/src/Container/VersionState.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Container; diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index e4625a24..00e1d521 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO; diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 8e351827..fa3b2c84 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Controller; diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 66e8a3e2..85d63549 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Controller; diff --git a/php/src/Controller/LoginController.php b/php/src/Controller/LoginController.php index d37a2210..12250c96 100644 --- a/php/src/Controller/LoginController.php +++ b/php/src/Controller/LoginController.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Controller; diff --git a/php/src/Cron/BackupNotification.php b/php/src/Cron/BackupNotification.php index 6fbab65f..4a4071e3 100644 --- a/php/src/Cron/BackupNotification.php +++ b/php/src/Cron/BackupNotification.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); // increase memory limit to 2GB diff --git a/php/src/Cron/CheckBackup.php b/php/src/Cron/CheckBackup.php index 6d9b027c..a8c27c59 100644 --- a/php/src/Cron/CheckBackup.php +++ b/php/src/Cron/CheckBackup.php @@ -1,17 +1,20 @@ -get(\AIO\Controller\DockerController::class); - -// Stop container and start backup check -$dockerController->checkBackup(); + +// SPDX-License-Identifier: AGPL-3.0-only + +declare(strict_types=1); + +// increase memory limit to 2GB +ini_set('memory_limit', '2048M'); + +use DI\Container; + +require __DIR__ . '/../../vendor/autoload.php'; + +$container = \AIO\DependencyInjection::GetContainer(); + +/** @var \AIO\Controller\DockerController $dockerController */ +$dockerController = $container->get(\AIO\Controller\DockerController::class); + +// Stop container and start backup check +$dockerController->checkBackup(); diff --git a/php/src/Cron/CheckFreeDiskSpace.php b/php/src/Cron/CheckFreeDiskSpace.php index 1b5d2d64..7d64fabc 100644 --- a/php/src/Cron/CheckFreeDiskSpace.php +++ b/php/src/Cron/CheckFreeDiskSpace.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); // increase memory limit to 2GB diff --git a/php/src/Cron/CreateBackup.php b/php/src/Cron/CreateBackup.php index 60366973..b1f764c4 100644 --- a/php/src/Cron/CreateBackup.php +++ b/php/src/Cron/CreateBackup.php @@ -1,17 +1,20 @@ -get(\AIO\Controller\DockerController::class); - -// Stop container and start backup -$dockerController->startBackup(); + +// SPDX-License-Identifier: AGPL-3.0-only + +declare(strict_types=1); + +// increase memory limit to 2GB +ini_set('memory_limit', '2048M'); + +use DI\Container; + +require __DIR__ . '/../../vendor/autoload.php'; + +$container = \AIO\DependencyInjection::GetContainer(); + +/** @var \AIO\Controller\DockerController $dockerController */ +$dockerController = $container->get(\AIO\Controller\DockerController::class); + +// Stop container and start backup +$dockerController->startBackup(); diff --git a/php/src/Cron/OutdatedNotification.php b/php/src/Cron/OutdatedNotification.php index 628f0924..2539d5f7 100644 --- a/php/src/Cron/OutdatedNotification.php +++ b/php/src/Cron/OutdatedNotification.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); // increase memory limit to 2GB diff --git a/php/src/Cron/PullContainerImages.php b/php/src/Cron/PullContainerImages.php index 43c87d28..8bc6d37c 100644 --- a/php/src/Cron/PullContainerImages.php +++ b/php/src/Cron/PullContainerImages.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); // increase memory limit to 2GB diff --git a/php/src/Cron/StartAndUpdateContainers.php b/php/src/Cron/StartAndUpdateContainers.php index 049245af..6ae89e81 100644 --- a/php/src/Cron/StartAndUpdateContainers.php +++ b/php/src/Cron/StartAndUpdateContainers.php @@ -1,20 +1,23 @@ -get(\AIO\Controller\DockerController::class); - -// Start apache -$dockerController->startTopContainer(true); + +// SPDX-License-Identifier: AGPL-3.0-only + +declare(strict_types=1); + +// increase memory limit to 2GB +ini_set('memory_limit', '2048M'); + +// Log whole log messages +ini_set('log_errors_max_len', '0'); + +use DI\Container; + +require __DIR__ . '/../../vendor/autoload.php'; + +$container = \AIO\DependencyInjection::GetContainer(); + +/** @var \AIO\Controller\DockerController $dockerController */ +$dockerController = $container->get(\AIO\Controller\DockerController::class); + +// Start apache +$dockerController->startTopContainer(true); diff --git a/php/src/Cron/StartContainers.php b/php/src/Cron/StartContainers.php index 366866ad..219b0934 100644 --- a/php/src/Cron/StartContainers.php +++ b/php/src/Cron/StartContainers.php @@ -1,20 +1,23 @@ -get(\AIO\Controller\DockerController::class); - -// Start apache -$dockerController->startTopContainer(false); + +// SPDX-License-Identifier: AGPL-3.0-only + +declare(strict_types=1); + +// increase memory limit to 2GB +ini_set('memory_limit', '2048M'); + +// Log whole log messages +ini_set('log_errors_max_len', '0'); + +use DI\Container; + +require __DIR__ . '/../../vendor/autoload.php'; + +$container = \AIO\DependencyInjection::GetContainer(); + +/** @var \AIO\Controller\DockerController $dockerController */ +$dockerController = $container->get(\AIO\Controller\DockerController::class); + +// Start apache +$dockerController->startTopContainer(false); diff --git a/php/src/Cron/StopContainers.php b/php/src/Cron/StopContainers.php index 89cf9798..20255547 100644 --- a/php/src/Cron/StopContainers.php +++ b/php/src/Cron/StopContainers.php @@ -1,17 +1,20 @@ -get(\AIO\Controller\DockerController::class); - -// Start apache -$dockerController->stopTopContainer(); + +// SPDX-License-Identifier: AGPL-3.0-only + +declare(strict_types=1); + +// increase memory limit to 2GB +ini_set('memory_limit', '2048M'); + +use DI\Container; + +require __DIR__ . '/../../vendor/autoload.php'; + +$container = \AIO\DependencyInjection::GetContainer(); + +/** @var \AIO\Controller\DockerController $dockerController */ +$dockerController = $container->get(\AIO\Controller\DockerController::class); + +// Start apache +$dockerController->stopTopContainer(); diff --git a/php/src/Cron/UpdateMastercontainer.php b/php/src/Cron/UpdateMastercontainer.php index 01c28e59..68f241f9 100644 --- a/php/src/Cron/UpdateMastercontainer.php +++ b/php/src/Cron/UpdateMastercontainer.php @@ -1,17 +1,20 @@ -get(\AIO\Controller\DockerController::class); - -# Update the mastercontainer -$dockerController->startWatchtower(); + +// SPDX-License-Identifier: AGPL-3.0-only + +declare(strict_types=1); + +// increase memory limit to 2GB +ini_set('memory_limit', '2048M'); + +use DI\Container; + +require __DIR__ . '/../../vendor/autoload.php'; + +$container = \AIO\DependencyInjection::GetContainer(); + +/** @var \AIO\Controller\DockerController $dockerController */ +$dockerController = $container->get(\AIO\Controller\DockerController::class); + +# Update the mastercontainer +$dockerController->startWatchtower(); diff --git a/php/src/Cron/UpdateNotification.php b/php/src/Cron/UpdateNotification.php index 2c12e2f4..5e570ae4 100644 --- a/php/src/Cron/UpdateNotification.php +++ b/php/src/Cron/UpdateNotification.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); // increase memory limit to 2GB diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 108a0f4e..c69ce695 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Data; diff --git a/php/src/Data/DataConst.php b/php/src/Data/DataConst.php index 10d5342b..ba1f18e4 100644 --- a/php/src/Data/DataConst.php +++ b/php/src/Data/DataConst.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Data; diff --git a/php/src/Data/InvalidSettingConfigurationException.php b/php/src/Data/InvalidSettingConfigurationException.php index 9db74add..7a07fb98 100644 --- a/php/src/Data/InvalidSettingConfigurationException.php +++ b/php/src/Data/InvalidSettingConfigurationException.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Data; diff --git a/php/src/Data/Setup.php b/php/src/Data/Setup.php index d101a762..bd8bff44 100644 --- a/php/src/Data/Setup.php +++ b/php/src/Data/Setup.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Data; diff --git a/php/src/DependencyInjection.php b/php/src/DependencyInjection.php index a7035a96..608dddb8 100644 --- a/php/src/DependencyInjection.php +++ b/php/src/DependencyInjection.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index ca6a4d72..4f1b8b8c 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Docker; diff --git a/php/src/Docker/DockerHubManager.php b/php/src/Docker/DockerHubManager.php index c11d81eb..3d984a6d 100644 --- a/php/src/Docker/DockerHubManager.php +++ b/php/src/Docker/DockerHubManager.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Docker; diff --git a/php/src/Docker/GitHubContainerRegistryManager.php b/php/src/Docker/GitHubContainerRegistryManager.php index cc92f944..55864dd7 100644 --- a/php/src/Docker/GitHubContainerRegistryManager.php +++ b/php/src/Docker/GitHubContainerRegistryManager.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Docker; diff --git a/php/src/Middleware/AuthMiddleware.php b/php/src/Middleware/AuthMiddleware.php index 8cea8db1..9d262ac7 100644 --- a/php/src/Middleware/AuthMiddleware.php +++ b/php/src/Middleware/AuthMiddleware.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Middleware; diff --git a/php/src/Twig/ClassExtension.php b/php/src/Twig/ClassExtension.php index b80d95c0..ccdaf532 100644 --- a/php/src/Twig/ClassExtension.php +++ b/php/src/Twig/ClassExtension.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Twig; diff --git a/php/src/Twig/CsrfExtension.php b/php/src/Twig/CsrfExtension.php index ba478308..e4ffff00 100644 --- a/php/src/Twig/CsrfExtension.php +++ b/php/src/Twig/CsrfExtension.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + declare(strict_types=1); namespace AIO\Twig; diff --git a/php/templates/already-installed.twig b/php/templates/already-installed.twig index e16e6792..462517ee 100644 --- a/php/templates/already-installed.twig +++ b/php/templates/already-installed.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2021 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + {% extends "layout.twig" %} {% block body %} diff --git a/php/templates/components/container-state.twig b/php/templates/components/container-state.twig index e684e7e7..6605c04b 100644 --- a/php/templates/components/container-state.twig +++ b/php/templates/components/container-state.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2025 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + {# @var c \App\Containers\Container #}
  • diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 8faa4474..6f0d4da4 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2021 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + {% extends "layout.twig" %} {% block body %} diff --git a/php/templates/includes/aio-config.twig b/php/templates/includes/aio-config.twig index fbb70230..9aa08cef 100644 --- a/php/templates/includes/aio-config.twig +++ b/php/templates/includes/aio-config.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2023 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} +
    Click here to view the current AIO config and documentation links {% if was_start_button_clicked == true %} diff --git a/php/templates/includes/aio-version.twig b/php/templates/includes/aio-version.twig index 2cb4f2f6..af8d77f6 100644 --- a/php/templates/includes/aio-version.twig +++ b/php/templates/includes/aio-version.twig @@ -1 +1,4 @@ +{# SPDX-FileCopyrightText: 2026 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + 13.0.3 diff --git a/php/templates/includes/backup-dirs.twig b/php/templates/includes/backup-dirs.twig index 390bf69c..bf62c3f1 100644 --- a/php/templates/includes/backup-dirs.twig +++ b/php/templates/includes/backup-dirs.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2023 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} +

    The folder path that you enter must start with / and must not end with /.

    An example for Linux is /mnt/backup.

    On Synology it could be /volume1/docker/nextcloud/backup.

    diff --git a/php/templates/includes/community-containers.twig b/php/templates/includes/community-containers.twig index da1dd26d..0a766b4a 100644 --- a/php/templates/includes/community-containers.twig +++ b/php/templates/includes/community-containers.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2025 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} +

    Community Containers

    In this section you can enable or disable optional Community Containers that are not included by default in the main installation. These containers are provided by the community and can be useful for various purposes and are automatically integrated in AIOs backup solution and update mechanisms.

    ⚠️ Caution: Community Containers are maintained by the community and not officially by Nextcloud. Some containers may not be compatible with your system, may not work as expected or may discontinue. Use them at your own risk. Please read the documentation for each container first before adding any as some are also incompatible between each other! Never add all of them at the same time!

    diff --git a/php/templates/includes/optional-containers.twig b/php/templates/includes/optional-containers.twig index b93ef57f..c1cf9a12 100644 --- a/php/templates/includes/optional-containers.twig +++ b/php/templates/includes/optional-containers.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2024 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} +

    Optional containers

    In this section you can enable or disable optional containers.

    {% if isAnyRunning == true %} diff --git a/php/templates/layout.twig b/php/templates/layout.twig index 15ec70f6..c05c9200 100644 --- a/php/templates/layout.twig +++ b/php/templates/layout.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2021 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + diff --git a/php/templates/log.twig b/php/templates/log.twig index 297498fc..c51f765f 100644 --- a/php/templates/log.twig +++ b/php/templates/log.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2026 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + diff --git a/php/templates/login.twig b/php/templates/login.twig index 74c29bef..2f777693 100644 --- a/php/templates/login.twig +++ b/php/templates/login.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2021 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + {% extends "layout.twig" %} {% block body %} diff --git a/php/templates/setup.twig b/php/templates/setup.twig index 7cc9227a..cf20cb6c 100644 --- a/php/templates/setup.twig +++ b/php/templates/setup.twig @@ -1,3 +1,6 @@ +{# SPDX-FileCopyrightText: 2021 Nextcloud GmbH #} +{# SPDX-License-Identifier: AGPL-3.0-only #} + {% extends "layout.twig" %} {% block body %} diff --git a/php/tests/playwright.config.js b/php/tests/playwright.config.js index 191a7f59..e41c72ff 100644 --- a/php/tests/playwright.config.js +++ b/php/tests/playwright.config.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2025 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + import { defineConfig, devices } from '@playwright/test' /** diff --git a/php/tests/tests/initial-setup.spec.js b/php/tests/tests/initial-setup.spec.js index 1f21f011..a5efe39e 100755 --- a/php/tests/tests/initial-setup.spec.js +++ b/php/tests/tests/initial-setup.spec.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2025 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + import { test, expect } from '@playwright/test'; import { writeFileSync } from 'node:fs' diff --git a/php/tests/tests/restore-instance.spec.js b/php/tests/tests/restore-instance.spec.js index 696a4376..620a3f26 100755 --- a/php/tests/tests/restore-instance.spec.js +++ b/php/tests/tests/restore-instance.spec.js @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2025 Nextcloud GmbH +// SPDX-License-Identifier: AGPL-3.0-only + import { test, expect } from '@playwright/test'; import { readFileSync } from 'node:fs';