docker-laravel-stack/watch.sh

15 lines
460 B
Bash
Raw Normal View History

2025-10-31 11:29:14 -04:00
#!/bin/sh
set -e
echo "👀 Watching Laravel source files for changes..."
echo "📁 Monitoring: /app"
echo "🚫 Ignoring: vendor node_modules storage bootstrap/cache"
inotifywait -m -r -e modify,create,delete,move \
--exclude 'vendor|node_modules|storage|bootstrap/cache' /app |
while read path action file; do
echo "🔄 Change detected: ${path}${file} (${action})"
echo "♻️ Rebuilding Laravel containers..."
docker compose up -d --build
done