make the volume scripts ignore ephemeral volumes

This commit is contained in:
goldsquid
2026-06-06 09:57:48 +07:00
parent d369f62c44
commit 91ef991773
10 changed files with 61 additions and 14 deletions

View File

@@ -1,17 +1,13 @@
BASEPATH="$(dirname "$0")"
source $BASEPATH/.env
source $BASEPATH/volume-utils.sh
IFS=':' read -ra parts <<< $COMPOSE_FILE
used_volumes=()
for part in "${parts[@]}"; do
# Convert YAML to JSON using yaml2json
json=$(yaml2json "$BASEPATH/$part")
# Extract volumes using jq
volumes=$(echo "$json" | jq -r '.volumes | keys[]' 2> /dev/null)
volumes=$(get_volume_keys "$BASEPATH/$part")
# Convert volumes to an array
prefix="rpc_"