From 49d557a184204425d524a76a1eef0af875f9414e Mon Sep 17 00:00:00 2001 From: Thorsten Bus Date: Sat, 11 Apr 2026 16:33:07 +0200 Subject: [PATCH] AI Tryfix for storage 404 problem --- build/boot-container.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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..."