rename production to services

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2022-12-25 00:58:09 +01:00
parent 3c57b2db56
commit 7a9a452f45
4 changed files with 8 additions and 9 deletions

View file

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

View file

@ -4,7 +4,7 @@
"additionalProperties": false,
"minProperties": 1,
"properties": {
"production": {
"services": {
"type": "array",
"items": {
"type": "object",

View file

@ -1,5 +1,5 @@
{
"production": [
"services": [
{
"container_name": "nextcloud-aio-apache",
"depends_on": [

View file

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