From 62cf86920b55f86f6a8e3a100a9fd0bd0835e683 Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Wed, 15 Nov 2023 15:41:10 -0500 Subject: [PATCH] Modifies materia-app dockerfile to nullify logging from php-fpm's access.log --- materia-app.Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/materia-app.Dockerfile b/materia-app.Dockerfile index 776f6c291..0efa9e484 100644 --- a/materia-app.Dockerfile +++ b/materia-app.Dockerfile @@ -40,6 +40,11 @@ RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer --ve # Use the default production configuration RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" +# By default the php-fpm image is including access.log in the docker stream +# These logs aren't particularly useful and add considerable bloat to the prod logs that have to be filtered out +# Modify php-fpm.d/docker.conf to point access.log to /dev/null/, which effectively prevents it from being picked up by the log driver +RUN sed -i 's/access.log = .*/access.log = \/dev\/null/' /usr/local/etc/php-fpm.d/docker.conf + WORKDIR /var/www/html # =====================================================================================================