diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 13c50c1..abb145e 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -37,6 +37,11 @@ fi # Storage symlink (idempotent) php artisan storage:link --no-interaction 2>/dev/null || true +# FrankenPHP/Caddy does not follow the public/storage→storage/app/public symlink +# reliably. Add an explicit Caddy route that serves /storage/* directly from the +# real directory, bypassing symlink resolution entirely. +export CADDY_SERVER_EXTRA_DIRECTIVES='handle_path /storage/* { root * /app/storage/app/public; file_server }' + # Background scheduler — fires every minute. Drives backup:tenants and other cron jobs. # Skipped if RUN_SCHEDULER=false (e.g., when running multiple replicas). if [ "${RUN_SCHEDULER:-true}" = "true" ]; then