From d641975040d170ddaa019e187444a19eb6da191a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 9 Dec 2024 15:19:33 +0100 Subject: [PATCH] fixes --- docker/production/Dockerfile | 6 ++++-- docker/production/etc/php/conf.d/zzz-custom-php.ini | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 docker/production/etc/php/conf.d/zzz-custom-php.ini diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile index 2cfd2aa8f..0590bcda5 100644 --- a/docker/production/Dockerfile +++ b/docker/production/Dockerfile @@ -96,8 +96,7 @@ RUN mkdir -p /usr/local/bin && \ chmod +x /usr/local/bin/cloudflared # Configure PHP -RUN echo 'upload_max_filesize=256M' > /usr/local/etc/php/conf.d/upload-limits.ini && \ - echo 'post_max_size=256M' >> /usr/local/etc/php/conf.d/upload-limits.ini +COPY docker/production/etc/php/conf.d/zzz-custom-php.ini /usr/local/etc/php/conf.d/zzz-custom-php.ini ENV PHP_OPCACHE_ENABLE=1 # Copy application files from previous stages @@ -115,8 +114,11 @@ COPY --chown=www-data:www-data public ./public COPY --chown=www-data:www-data routes ./routes COPY --chown=www-data:www-data storage ./storage COPY --chown=www-data:www-data templates ./templates +COPY --chown=www-data:www-data resources/views ./resources/views COPY --chown=www-data:www-data artisan artisan +RUN composer dump-autoload + # Configure Nginx and S6 overlay COPY docker/production/etc/nginx/conf.d/custom.conf /etc/nginx/conf.d/custom.conf COPY docker/production/etc/nginx/site-opts.d/http.conf /etc/nginx/site-opts.d/http.conf diff --git a/docker/production/etc/php/conf.d/zzz-custom-php.ini b/docker/production/etc/php/conf.d/zzz-custom-php.ini new file mode 100644 index 000000000..1e3ea566c --- /dev/null +++ b/docker/production/etc/php/conf.d/zzz-custom-php.ini @@ -0,0 +1,9 @@ +error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE +error_log = /var/www/html/storage/logs/php-error.log +log_errors = On +log_errors_max_len = 8192 +ignore_repeated_errors = On +ignore_repeated_source = On + +upload_max_filesize = 256M +post_max_size = 256M