Merge pull request #2631 from nextcloud/enh/1581/add-profiles-and-networks

add profiles and networks to container-schema.json
This commit is contained in:
Simon L 2023-06-06 10:31:38 +02:00 committed by GitHub
commit ac5a59c5b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 76 additions and 15 deletions

View file

@ -112,15 +112,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