fix paths in entrypoint

This commit is contained in:
Robert Schumann 2022-08-10 09:31:13 +02:00
parent 07b5a195b4
commit aab0d17980
2 changed files with 8 additions and 5 deletions

View File

@ -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. 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 viewer: 2022-08-10
dmarcts report parser: 2022-08-10 dmarcts report parser: 2022-08-10

View File

@ -1,14 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# change according to alpine and php release
PHP_VERSION=81
# Display PHP error's or not # Display PHP error's or not
if [[ "$ERRORS" != "1" ]] ; then if [[ "$ERRORS" != "1" ]] ; then
sed -i -e "s/error_reporting =.*/error_reporting = E_ALL/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/php8/php.ini sed -i -e "s/display_errors =.*/display_errors = stdout/g" /etc/php${PHP_VERSION}/php.ini
fi fi
# Disable opcache? # Disable opcache?
if [[ -v NO_OPCACHE ]]; then 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 fi
# Tweak nginx to match the workers to cpu's # 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 sed -i -e "s/worker_processes 5/worker_processes $procs/" /etc/nginx/nginx.conf
# Copy important env vars for PHP-FPM to access # 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 '[www]' > "$PHP_ENV_FILE"
echo 'user = nginx' >> "$PHP_ENV_FILE" echo 'user = nginx' >> "$PHP_ENV_FILE"
echo 'group = www-data' >> "$PHP_ENV_FILE" echo 'group = www-data' >> "$PHP_ENV_FILE"