fix: pipe PHP/FPM errors to stderr for docker compose logs

This commit is contained in:
Thorsten Bus 2026-03-30 19:06:45 +02:00
parent 843553b743
commit db15a71378
3 changed files with 12 additions and 0 deletions

View file

@ -30,6 +30,8 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /app WORKDIR /app
COPY build/fpm-healthcheck.conf /usr/local/etc/php-fpm.d/zz-healthcheck.conf COPY build/fpm-healthcheck.conf /usr/local/etc/php-fpm.d/zz-healthcheck.conf
COPY build/php-error-logging.conf /usr/local/etc/php-fpm.d/zz-error-logging.conf
COPY build/php-errors.ini /usr/local/etc/php/conf.d/errors.ini
EXPOSE 9000 EXPOSE 9000

View file

@ -0,0 +1,5 @@
[www]
catch_workers_output = yes
decorate_workers_output = no
php_admin_flag[log_errors] = on
php_admin_value[error_log] = /proc/self/fd/2

5
build/php-errors.ini Normal file
View file

@ -0,0 +1,5 @@
log_errors = On
error_log = /proc/self/fd/2
error_reporting = E_ALL
display_errors = Off
display_startup_errors = On