AI Tryfix for storage 404 problem

This commit is contained in:
Thorsten Bus 2026-04-11 16:33:07 +02:00
parent 17a8d602ce
commit 49d557a184

View file

@ -29,10 +29,12 @@ rm -f /app/public/hot
echo "[boot] Building Vite assets..."
npm run build
# Create the storage symlink after volumes are mounted
# (public/storage → storage/app/public)
# Create RELATIVE storage symlink (public/storage → ../storage/app/public).
# Must be relative: Caddy serves the bind-mounted ./public from the host, where
# the container's /app/* paths do not exist — an absolute symlink would dangle
# from Caddy's view and return 404 for every /storage/* request.
echo "[boot] Creating storage symlink..."
php artisan storage:link --force 2>/dev/null || true
ln -sfn ../storage/app/public public/storage
# Run database migrations
echo "[boot] Running migrations..."