diff --git a/build/boot-container.sh b/build/boot-container.sh index d67c57c..731df0e 100755 --- a/build/boot-container.sh +++ b/build/boot-container.sh @@ -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..."