From 10b3984aa1a4560053aa8c76aab5978d8b6a78b9 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Thu, 29 Feb 2024 16:20:36 +0100 Subject: [PATCH] use php-fpm config to point to stdout/stderr instead of making a symlink in Dockerfile this fixes the issue with the log messages appearing two times --- CHANGELOG.md | 4 ++++ Dockerfile | 5 +---- src/php/elabpool.conf | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c445b7..b2afd43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Container image version # Note: the version here is from `ELABIMG_VERSION` present in Dockerfile, not the tagged one +# 5.0.1 + +* Fix issue with messages being logged two times (error log) + # 5.0.0 * Change the default value of ``PHP_MAX_MEMORY`` from 256M (256 Mb) to 2G (2 Gb). diff --git a/Dockerfile b/Dockerfile index 576049a..703ddf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -135,7 +135,7 @@ RUN abuild-keygen -n -a && abuild && find /home/builder/packages -type f -name ' FROM alpine:3.18 # this is versioning for the container image -ENV ELABIMG_VERSION=5.0.0 +ENV ELABIMG_VERSION=5.0.1 # the target elabftw version is passed with --build-arg # it is a mandatory ARG @@ -214,9 +214,6 @@ RUN apk upgrade -U -a && apk add --no-cache \ RUN mv /usr/bin/php81 /usr/bin/php81-real COPY ./src/php/phpwithenv /usr/bin/php81 -# redirect all the php-fpm errors to stderr -RUN ln -sf /dev/stderr /var/log/php81/error.log - # S6-OVERLAY # install s6-overlay, our init system. Workaround for different versions using TARGETPLATFORM # platform see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope diff --git a/src/php/elabpool.conf b/src/php/elabpool.conf index 265bd92..d2fec55 100644 --- a/src/php/elabpool.conf +++ b/src/php/elabpool.conf @@ -1,5 +1,6 @@ ; Start a new pool named 'elabpool'. [elabpool] +access.log = /dev/stdout ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group @@ -118,3 +119,4 @@ env[ELAB_AWS_ACCESS_KEY] = "%ELAB_AWS_ACCESS_KEY%" env[ELAB_AWS_SECRET_KEY] = "%ELAB_AWS_SECRET_KEY%" php_admin_value[memory_limit] = %PHP_MAX_MEMORY% +php_admin_value[error_log] = /dev/stderr