Add nextcheck.sh
This commit is contained in:
16
nextcheck.sh
Normal file
16
nextcheck.sh
Normal 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
|
||||
Reference in New Issue
Block a user