diff --git a/nextcheck.sh b/nextcheck.sh new file mode 100644 index 0000000..baaab67 --- /dev/null +++ b/nextcheck.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Loop through all running containers +for container in $(docker ps --format '{{.Names}}'); do + echo "------------------------------------------------" + echo "Checking container: $container" + + # Try to list the installed next version inside the container + # Most Coolify/Nixpacks containers place source in /app + version=$(docker exec "$container" npm list next --depth=0 2>/dev/null | grep 'next@') + + if [ ! -z "$version" ]; then + echo -e "\033[31mFOUND NEXT.JS:\033[0m $version" + else + echo "Next.js not detected (or not a Node container)" + fi +done