From 50779a329a2f0cb641a3e762d8fa16d2191146bb Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 31 May 2023 00:21:17 +0200 Subject: [PATCH] add profiles and networks to container-schema.json Signed-off-by: Simon L --- manual-install/update-yaml.sh | 7 ---- php/containers-schema.json | 17 +++++++-- php/containers.json | 67 +++++++++++++++++++++++++++++++---- 3 files changed, 76 insertions(+), 15 deletions(-) diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index fcb1ca11..532ca415 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -109,15 +109,8 @@ do if [ "$name" != "nextcloud-aio-apache" ]; then OUTPUT="$(echo "$OUTPUT" | sed "/ $name:/i\ ")" fi - if ! echo "$name" | grep "apache$" && ! echo "$name" | grep "database$" && ! echo "$name" | grep "nextcloud$" && ! echo "$name" | grep "redis$"; then - sed -i '/container_name/d' containers.yml - SLIM_NAME="${name##nextcloud-aio-}" - OUTPUT="$(echo "$OUTPUT" | sed "/container_name: $name$/a\ \ \ \ profiles:\ \[\"$SLIM_NAME\"\]")" - fi done -OUTPUT="$(echo "$OUTPUT" | sed "/restart: /a\ \ \ \ networks:\n\ \ \ \ \ \ - nextcloud-aio")" - echo "$OUTPUT" > containers.yml sed -i '/container_name/d' containers.yml diff --git a/php/containers-schema.json b/php/containers-schema.json index 69c04100..30c8f0a8 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -117,8 +117,21 @@ "type": "array", "items": { "type": "string", - "pattern": "^(php /var/www/html/occ .*|echo .*)$", - "minlength": 1 + "pattern": "^(php /var/www/html/occ .*|echo .*)$" + } + }, + "profiles": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-z-]+$" + } + }, + "networks": { + "type": "array", + "items": { + "type": "string", + "pattern": "^nextcloud-aio$" } }, "volumes": { diff --git a/php/containers.json b/php/containers.json index 9280170f..45af71e5 100644 --- a/php/containers.json +++ b/php/containers.json @@ -46,6 +46,9 @@ "backup_volumes": [ "nextcloud_aio_nextcloud", "nextcloud_aio_apache" + ], + "networks": [ + "nextcloud-aio" ] }, { @@ -84,6 +87,9 @@ "backup_volumes": [ "nextcloud_aio_database", "nextcloud_aio_database_dump" + ], + "networks": [ + "nextcloud-aio" ] }, { @@ -182,6 +188,9 @@ ], "backup_volumes": [ "nextcloud_aio_nextcloud" + ], + "networks": [ + "nextcloud-aio" ] }, { @@ -207,7 +216,10 @@ "REDIS_PASSWORD", "ONLYOFFICE_SECRET" ], - "restart": "unless-stopped" + "restart": "unless-stopped", + "networks": [ + "nextcloud-aio" + ] }, { "container_name": "nextcloud-aio-collabora", @@ -229,6 +241,12 @@ "nextcloud_exec_commands": [ "echo 'Activating collabora config...'", "php /var/www/html/occ richdocuments:activate-config" + ], + "profiles": [ + "collabora" + ], + "networks": [ + "nextcloud-aio" ] }, { @@ -264,7 +282,14 @@ "SIGNALING_SECRET", "TALK_INTERNAL_SECRET" ], - "restart": "unless-stopped" + "restart": "unless-stopped", + "profiles": [ + "talk", + "talk-recording" + ], + "networks": [ + "nextcloud-aio" + ] }, { "container_name": "nextcloud-aio-talk-recording", @@ -285,7 +310,13 @@ "RECORDING_SECRET", "TALK_INTERNAL_SECRET" ], - "restart": "unless-stopped" + "restart": "unless-stopped", + "profiles": [ + "talk-recording" + ], + "networks": [ + "nextcloud-aio" + ] }, { "container_name": "nextcloud-aio-borgbackup", @@ -395,7 +426,13 @@ "writeable": true } ], - "restart": "unless-stopped" + "restart": "unless-stopped", + "profiles": [ + "clamav" + ], + "networks": [ + "nextcloud-aio" + ] }, { "container_name": "nextcloud-aio-onlyoffice", @@ -421,7 +458,13 @@ "secrets": [ "ONLYOFFICE_SECRET" ], - "restart": "unless-stopped" + "restart": "unless-stopped", + "profiles": [ + "onlyoffice" + ], + "networks": [ + "nextcloud-aio" + ] }, { "container_name": "nextcloud-aio-imaginary", @@ -437,6 +480,12 @@ "restart": "unless-stopped", "cap_add": [ "SYS_NICE" + ], + "profiles": [ + "imaginary" + ], + "networks": [ + "nextcloud-aio" ] }, { @@ -460,7 +509,13 @@ "writeable": true } ], - "restart": "unless-stopped" + "restart": "unless-stopped", + "profiles": [ + "fulltextsearch" + ], + "networks": [ + "nextcloud-aio" + ] } ] }