diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 0c7ae31..51f0bce 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0cef8e6..2f4f001 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install ShellCheck run: sudo apt-get install -y shellcheck @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install hadolint run: | @@ -45,7 +45,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install yamllint run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 617461f..6d11074 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 @@ -36,7 +36,7 @@ jobs: driver: docker-container - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v4.0.1 + uses: gittools/actions/gitversion/setup@v4.1.0 with: versionSpec: "6.1.0" @@ -45,7 +45,7 @@ jobs: - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v4.0.1 + uses: gittools/actions/gitversion/execute@v4.1.0 with: useConfigFile: true configFilePath: ci/git-version.yml @@ -128,7 +128,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 @@ -138,7 +138,7 @@ jobs: git config --global user.name "UDX Worker PHP" - name: Download SBOM Artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: sbom diff --git a/Dockerfile b/Dockerfile index eeef787..c52a2f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ # Use the UDX worker as the base image -FROM usabilitydynamics/udx-worker:0.24.0 +FROM usabilitydynamics/udx-worker:0.27.0 # Add metadata labels LABEL maintainer="UDX" -LABEL version="0.23.0" +LABEL version="0.24.0" # Arguments and Environment Variables ARG PHP_VERSION=8.4 ARG PHP_PACKAGE_VERSION=8.4.5-1ubuntu1.1 -ARG NGINX_VERSION=1.26.3-2ubuntu1.1 +ARG NGINX_VERSION=1.26.3-2ubuntu1.2 # Set the PHP_VERSION and PHP_PACKAGE_VERSION as environment variables ENV PHP_VERSION="${PHP_VERSION}" @@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ php"${PHP_VERSION}"-curl="${PHP_PACKAGE_VERSION}" \ php"${PHP_VERSION}"-xml="${PHP_PACKAGE_VERSION}" \ php"${PHP_VERSION}"-zip="${PHP_PACKAGE_VERSION}" \ - mysql-client=8.4.5-0ubuntu0.2 && \ + mysql-client=8.4.6-0ubuntu0.25.04.3 && \ apt-get clean && \ rm -rf /tmp/* /var/tmp/* && \ mkdir -p /etc/apt/sources.list.d && \ @@ -53,7 +53,7 @@ RUN sed -i "s|\${PHP_VERSION}|${PHP_VERSION}|g" /etc/nginx/snippets/fastcgi-php" echo "include=/etc/php/${PHP_VERSION}/fpm/pool.d/*.conf" >> /etc/php/"${PHP_VERSION}"/fpm/php-fpm.conf # Set PHP-FPM socket permissions in the configuration -RUN sed -i "s|^error_log =.*|error_log = /var/log/php/fpm.log|" /etc/php/"${PHP_VERSION}"/fpm/php-fpm.conf && \ +RUN sed -i "s|^error_log =.*|error_log = /dev/stderr|" /etc/php/"${PHP_VERSION}"/fpm/php-fpm.conf && \ sed -i "s|^listen.owner =.*|listen.owner = ${USER}|" /etc/php/"${PHP_VERSION}"/fpm/pool.d/www.conf && \ sed -i "s|^listen.group =.*|listen.group = ${USER}|" /etc/php/"${PHP_VERSION}"/fpm/pool.d/www.conf && \ sed -i "s|^listen.mode =.*|listen.mode = 0660|" /etc/php/"${PHP_VERSION}"/fpm/pool.d/www.conf && \ diff --git a/bin/start-php-fpm.sh b/bin/start-php-fpm.sh index 2fd80b9..8e211f7 100644 --- a/bin/start-php-fpm.sh +++ b/bin/start-php-fpm.sh @@ -60,4 +60,4 @@ echo " Error log ${PHP_ERROR_LOG}" # Start PHP-FPM echo " * Starting PHP-FPM..." -exec php-fpm"${PHP_VERSION}" --nodaemonize --fpm-config "${PHP_FPM_CONFIG}" \ No newline at end of file +exec php-fpm"${PHP_VERSION}" --nodaemonize --fpm-config "${PHP_FPM_CONFIG}" 2>&1 diff --git a/etc/configs/php/php-fpm.conf b/etc/configs/php/php-fpm.conf index e3535f5..1daeacd 100644 --- a/etc/configs/php/php-fpm.conf +++ b/etc/configs/php/php-fpm.conf @@ -1,2 +1,4 @@ [global] -error_log = /var/log/php/fpm.log +; Send PHP-FPM logs to stderr +error_log = /dev/stderr +include=/etc/php/${PHP_VERSION}/fpm/pool.d/*.conf diff --git a/etc/configs/php/www.conf b/etc/configs/php/www.conf index ffd6ce1..a571c0d 100644 --- a/etc/configs/php/www.conf +++ b/etc/configs/php/www.conf @@ -8,4 +8,7 @@ pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 -pm.max_spare_servers = 3 \ No newline at end of file +pm.max_spare_servers = 3 + +; Capture PHP worker output (including error_log) and send to FPM error log +catch_workers_output = yes \ No newline at end of file