Skip to content

Commit

Permalink
use php-fpm config to point to stdout/stderr
Browse files Browse the repository at this point in the history
instead of making a symlink in Dockerfile
this fixes the issue with the log messages appearing two times
  • Loading branch information
NicolasCARPi committed Feb 29, 2024
1 parent 13380d7 commit 10b3984
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/php/elabpool.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

0 comments on commit 10b3984

Please sign in to comment.