Add nextcheck.sh

This commit is contained in:
2025-12-07 05:16:18 +00:00
parent c3a0d574ad
commit cacb474740

16
nextcheck.sh Normal file
View File

@@ -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