fix(deploy): use 'docker compose config --services' for reliable service name extraction

Replace fragile grep-based extraction that matched volume names
(nats_data, tools_data) and 'null' as pseudo-services.
This commit is contained in:
asepharyana
2026-07-25 14:21:48 +07:00
parent fde53f22b6
commit 95a9921b7a
+1 -1
View File
@@ -164,7 +164,7 @@ jobs:
TARGET_SERVICES=""
for f in $TARGET_COMPOSE; do
if [ -f "$f" ]; then
svcs=$(grep -E '^\s{2}[a-zA-Z0-9_-]+:' "$f" | grep -v 'app-shared-net' | sed 's/://g' | xargs)
svcs=$($COMPOSE_CMD -f "$f" config --services 2>/dev/null | tr '\n' ' ' | xargs)
TARGET_SERVICES="$TARGET_SERVICES $svcs"
fi
done