From aab0d1798082bd8d7e86e8d4794a67d21927fbbb Mon Sep 17 00:00:00 2001 From: Robert Schumann Date: Wed, 10 Aug 2022 09:31:13 +0200 Subject: [PATCH] fix paths in entrypoint --- README.md | 2 +- manifest/entrypoint.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fbdc84e..fe666b3 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ docker run -e ... -ti gutmensch/dmarc-report New dmarc reports will be fetched every 15 minutes past the hour, every hour. Therefore it can take up to one hour for the first report to be fetched. -## Versions for last build latest and docker image tag 1.2 +## Versions for last build latest and docker image tag 1.3 dmarcts report viewer: 2022-08-10 dmarcts report parser: 2022-08-10 diff --git a/manifest/entrypoint.sh b/manifest/entrypoint.sh index 1936770..3256961 100755 --- a/manifest/entrypoint.sh +++ b/manifest/entrypoint.sh @@ -1,14 +1,17 @@ #!/usr/bin/env bash +# change according to alpine and php release +PHP_VERSION=81 + # Display PHP error's or not if [[ "$ERRORS" != "1" ]] ; then - sed -i -e "s/error_reporting =.*/error_reporting = E_ALL/g" /etc/php8/php.ini - sed -i -e "s/display_errors =.*/display_errors = stdout/g" /etc/php8/php.ini + sed -i -e "s/error_reporting =.*/error_reporting = E_ALL/g" /etc/php${PHP_VERSION}/php.ini + sed -i -e "s/display_errors =.*/display_errors = stdout/g" /etc/php${PHP_VERSION}/php.ini fi # Disable opcache? if [[ -v NO_OPCACHE ]]; then - sed -i -e "s/zend_extension=opcache.so/;zend_extension=opcache.so/g" /etc/php8/conf.d/00_opcache.ini + sed -i -e "s/zend_extension=opcache.so/;zend_extension=opcache.so/g" /etc/php${PHP_VERSION}/conf.d/00_opcache.ini fi # Tweak nginx to match the workers to cpu's @@ -16,7 +19,7 @@ procs=$(cat /proc/cpuinfo | grep processor | wc -l) sed -i -e "s/worker_processes 5/worker_processes $procs/" /etc/nginx/nginx.conf # Copy important env vars for PHP-FPM to access -PHP_ENV_FILE="/etc/php81/php-fpm.d/${PHP_ENV_FILE:-env.conf}" +PHP_ENV_FILE="/etc/php${PHP_VERSION}/php-fpm.d/${PHP_ENV_FILE:-env.conf}" echo '[www]' > "$PHP_ENV_FILE" echo 'user = nginx' >> "$PHP_ENV_FILE" echo 'group = www-data' >> "$PHP_ENV_FILE"