diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 7067133e68a..df066696b50 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -17,6 +17,7 @@ OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].secrets)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].devices)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].backup_volumes)')" OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].nextcloud_exec_commands)')" +OUTPUT="$(echo "$OUTPUT" | jq 'del(.services[].image_tag)')" 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"))')" diff --git a/php/containers-schema.json b/php/containers-schema.json index d608895abbf..9a4fae302e6 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -10,7 +10,7 @@ "type": "object", "additionalProperties": false, "minProperties": 2, - "required": ["image", "container_name"], + "required": ["image", "container_name", "image_tag"], "properties": { "image": { "type": "string", @@ -98,7 +98,7 @@ }, "image_tag": { "type": "string", - "pattern": "^[a-z0-9.-]+$" + "pattern": "^([a-z0-9.-]+|%AIO_CHANNEL%)$" }, "devices": { "type": "array", diff --git a/php/containers.json b/php/containers.json index 779354153b3..75e6f830ab5 100644 --- a/php/containers.json +++ b/php/containers.json @@ -2,6 +2,7 @@ "aio_services_v1": [ { "container_name": "nextcloud-aio-apache", + "image_tag": "%AIO_CHANNEL%", "depends_on": [ "nextcloud-aio-onlyoffice", "nextcloud-aio-collabora", @@ -68,6 +69,7 @@ }, { "container_name": "nextcloud-aio-database", + "image_tag": "%AIO_CHANNEL%", "display_name": "Database", "image": "nextcloud/aio-postgresql", "init": true, @@ -114,6 +116,7 @@ }, { "container_name": "nextcloud-aio-nextcloud", + "image_tag": "%AIO_CHANNEL%", "depends_on": [ "nextcloud-aio-database", "nextcloud-aio-redis", @@ -221,6 +224,7 @@ }, { "container_name": "nextcloud-aio-notify-push", + "image_tag": "%AIO_CHANNEL%", "display_name": "Notify Push", "image": "nextcloud/aio-notify-push", "init": true, @@ -257,6 +261,7 @@ }, { "container_name": "nextcloud-aio-redis", + "image_tag": "%AIO_CHANNEL%", "display_name": "Redis", "image": "nextcloud/aio-redis", "init": true, @@ -288,6 +293,7 @@ }, { "container_name": "nextcloud-aio-collabora", + "image_tag": "%AIO_CHANNEL%", "display_name": "Collabora", "image": "nextcloud/aio-collabora", "init": true, @@ -317,6 +323,7 @@ }, { "container_name": "nextcloud-aio-talk", + "image_tag": "%AIO_CHANNEL%", "display_name": "Talk", "image": "nextcloud/aio-talk", "init": true, @@ -368,6 +375,7 @@ }, { "container_name": "nextcloud-aio-talk-recording", + "image_tag": "%AIO_CHANNEL%", "display_name": "Talk Recording", "image": "nextcloud/aio-talk-recording", "init": true, @@ -401,6 +409,7 @@ }, { "container_name": "nextcloud-aio-borgbackup", + "image_tag": "%AIO_CHANNEL%", "image": "nextcloud/aio-borgbackup", "init": true, "environment": [ @@ -463,6 +472,7 @@ }, { "container_name": "nextcloud-aio-watchtower", + "image_tag": "%AIO_CHANNEL%", "image": "nextcloud/aio-watchtower", "init": true, "environment": [ @@ -479,6 +489,7 @@ }, { "container_name": "nextcloud-aio-domaincheck", + "image_tag": "%AIO_CHANNEL%", "image": "nextcloud/aio-domaincheck", "init": true, "ports": [ @@ -505,6 +516,7 @@ }, { "container_name": "nextcloud-aio-clamav", + "image_tag": "%AIO_CHANNEL%", "display_name": "ClamAV", "image": "nextcloud/aio-clamav", "init": false, @@ -539,6 +551,7 @@ }, { "container_name": "nextcloud-aio-onlyoffice", + "image_tag": "%AIO_CHANNEL%", "display_name": "OnlyOffice", "image": "nextcloud/aio-onlyoffice", "init": true, @@ -576,6 +589,7 @@ }, { "container_name": "nextcloud-aio-imaginary", + "image_tag": "%AIO_CHANNEL%", "display_name": "Imaginary", "image": "nextcloud/aio-imaginary", "init": true, @@ -603,6 +617,7 @@ }, { "container_name": "nextcloud-aio-fulltextsearch", + "image_tag": "%AIO_CHANNEL%", "display_name": "Fulltextsearch", "image": "nextcloud/aio-fulltextsearch", "init": false, @@ -642,6 +657,7 @@ }, { "container_name": "nextcloud-aio-docker-socket-proxy", + "image_tag": "%AIO_CHANNEL%", "display_name": "Docker Socket Proxy", "image": "nextcloud/aio-docker-socket-proxy", "init": true, diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 63c46064fb5..19e0d3bb8ec 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -269,7 +269,7 @@ private function GetDefinition(bool $latest): array $init = $entry['init']; } - $imageTag = ''; + $imageTag = '%AIO_CHANNEL%'; if (isset($entry['image_tag'])) { $imageTag = $entry['image_tag']; } diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 673a2f12864..738ae8b71d8 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -49,7 +49,7 @@ private function BuildApiUrl(string $url) : string { private function BuildImageName(Container $container) : string { $tag = $container->GetImageTag(); - if ($tag === '') { + if ($tag === '%AIO_CHANNEL%') { $tag = $this->GetCurrentChannel(); } return $container->GetContainerName() . ':' . $tag; @@ -100,7 +100,7 @@ public function GetContainerRestartingState(Container $container) : IContainerSt public function GetContainerUpdateState(Container $container) : IContainerState { $tag = $container->GetImageTag(); - if ($tag === '') { + if ($tag === '%AIO_CHANNEL%') { $tag = $this->GetCurrentChannel(); }