AI Tryfix for storage 404 problem
This commit is contained in:
parent
17a8d602ce
commit
49d557a184
|
|
@ -29,10 +29,12 @@ rm -f /app/public/hot
|
||||||
echo "[boot] Building Vite assets..."
|
echo "[boot] Building Vite assets..."
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
# Create the storage symlink after volumes are mounted
|
# Create RELATIVE storage symlink (public/storage → ../storage/app/public).
|
||||||
# (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..."
|
echo "[boot] Creating storage symlink..."
|
||||||
php artisan storage:link --force 2>/dev/null || true
|
ln -sfn ../storage/app/public public/storage
|
||||||
|
|
||||||
# Run database migrations
|
# Run database migrations
|
||||||
echo "[boot] Running migrations..."
|
echo "[boot] Running migrations..."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue