diff --git a/Dockerfile b/Dockerfile index cbf366d..075f508 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ COPY --from=composer:2.7 /usr/bin/composer /usr/bin/composer WORKDIR /var/www/html COPY --from=code /var/www/html /var/www/html -RUN composer dump-autoload --optimize --no-dev --no-interaction \ +RUN composer dump-autoload --optimize --no-dev --no-scripts --no-interaction \ && mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views \ storage/logs storage/app/public bootstrap/cache \ && chown -R www-data:www-data storage bootstrap/cache \ diff --git a/docker/php/entrypoint.sh b/docker/php/entrypoint.sh index f9621bd..1848f59 100644 --- a/docker/php/entrypoint.sh +++ b/docker/php/entrypoint.sh @@ -12,6 +12,9 @@ mkdir -p storage/framework/cache storage/framework/sessions storage/framework/vi chmod -R 775 storage bootstrap/cache 2>/dev/null || true chown -R www-data:www-data storage bootstrap/cache 2>/dev/null || true +# Package discovery (build skipped scripts — run here with real env). +php artisan package:discover --ansi 2>/dev/null || true + # Public storage symlink (idempotent). if [ ! -L public/storage ] && [ -d storage/app/public ]; then php artisan storage:link 2>/dev/null || true