rename identifier to container_name

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2022-12-25 00:36:19 +01:00
parent 4750fb228f
commit 7720ed5061
4 changed files with 24 additions and 25 deletions

View file

@ -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

View file

@ -29,7 +29,7 @@
"type": "string"
}
},
"identifier": {
"container_name": {
"type": "string"
},
"internalPorts": {

View file

@ -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",

View file

@ -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'],