Add storage symlink to git; fix entrypoint to recreate if broken

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 16:44:06 +05:00
parent bdb49281b8
commit d706eb9a87
2 changed files with 6 additions and 2 deletions

View File

@@ -2,8 +2,11 @@
cd /var/www
# Create storage symlink (ignore errors)
php artisan storage:link --force 2>/dev/null || true
# Ensure storage symlink exists (recreate if missing or broken)
if [ ! -L /var/www/public/storage ] || [ ! -e /var/www/public/storage ]; then
rm -rf /var/www/public/storage
ln -sfn /var/www/storage/app/public /var/www/public/storage
fi
# Cache config (ignore errors)
php artisan config:cache --no-ansi 2>/dev/null || true