From 0e1edde3a704a7c3856dc68847e6e218c00b3617 Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 14 Mar 2022 22:40:13 +0100 Subject: [PATCH] allow to upgrade the mastercontainer even if no update was found Signed-off-by: szaimen --- php/public/index.php | 1 + php/src/Docker/DockerHubManager.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/php/public/index.php b/php/public/index.php index 2c1acaf2..163fb634 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -48,6 +48,7 @@ $app->add(new \AIO\Middleware\AuthMiddleware($container->get(\AIO\Auth\AuthManag // API $app->post('/api/docker/watchtower', AIO\Controller\DockerController::class . ':StartWatchtowerContainer'); +$app->get('/api/docker/getwatchtower', AIO\Controller\DockerController::class . ':StartWatchtowerContainer'); $app->post('/api/docker/start', AIO\Controller\DockerController::class . ':StartContainer'); $app->post('/api/docker/backup', AIO\Controller\DockerController::class . ':StartBackupContainerBackup'); $app->post('/api/docker/backup-check', AIO\Controller\DockerController::class . ':StartBackupContainerCheck'); diff --git a/php/src/Docker/DockerHubManager.php b/php/src/Docker/DockerHubManager.php index 9bbd776c..e0bcb03a 100644 --- a/php/src/Docker/DockerHubManager.php +++ b/php/src/Docker/DockerHubManager.php @@ -23,6 +23,8 @@ class DockerHubManager return $cachedVersion; } + // If one of the links below should ever become outdated, we can still upgrade the mastercontainer via the webinterface manually by opening '/api/docker/getwatchtower' + try { $authTokenRequest = $this->guzzleClient->request( 'GET',