From b42420b7c6de7fa815dc96941946fcdf45ecb404 Mon Sep 17 00:00:00 2001 From: soeren Date: Fri, 5 Dec 2025 19:30:36 +0100 Subject: [PATCH] another fix --- Dockerfile | 12 +++++------- docker-compose.yml | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 678cd1c..1970b70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1 + FROM php:8.3-fpm-alpine AS php_build ENV COMPOSER_ALLOW_SUPERUSER=1 @@ -37,12 +39,11 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/composer WORKDIR /var/www/html -COPY composer.json composer.lock ./ +# Copy full application so artisan is available for composer scripts when desired. +COPY . . RUN set -eux; \ - composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction - -COPY . . + composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction --no-progress --no-scripts RUN set -eux; \ mkdir -p storage/app/public storage/logs bootstrap/cache; \ @@ -64,6 +65,3 @@ COPY --from=php_app /var/www/html/storage/app/public /var/www/html/storage/app/p COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf EXPOSE 80 -# syntax=docker/dockerfile:1 - -FROM php:8.3-fpm-alpine AS php_build diff --git a/docker-compose.yml b/docker-compose.yml index 0fe6b52..ae013f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,7 @@ services: command: > sh -c " chown -R www-data:www-data storage bootstrap/cache && + php artisan package:discover --ansi && php artisan storage:link --ansi || true && php artisan config:cache --ansi && php artisan route:cache --ansi &&