mirror of
https://github.com/gutmensch/docker-dmarc-report.git
synced 2025-12-29 16:15:55 +00:00
fix latest changes to viewer and parser
* new dependency postgres and PDO * php8 compatible
This commit is contained in:
@@ -16,11 +16,13 @@ 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/php8/php-fpm.d/${PHP_ENV_FILE:-env.conf}"
|
||||
PHP_ENV_FILE="/etc/php81/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"
|
||||
env | grep -e 'REPORT_DB_HOST' -e 'REPORT_DB_PORT' -e 'REPORT_DB_NAME' -e 'REPORT_DB_USER' -e 'REPORT_DB_PASS' | sed "s/\(.*\)=\(.*\)/env[\1] = '\2'/" >> "$PHP_ENV_FILE"
|
||||
echo 'listen.owner = nginx' >> "$PHP_ENV_FILE"
|
||||
echo 'listen.group = www-data' >> "$PHP_ENV_FILE"
|
||||
env | grep -e 'REPORT_DB_TYPE' -e 'REPORT_DB_HOST' -e 'REPORT_DB_PORT' -e 'REPORT_DB_NAME' -e 'REPORT_DB_USER' -e 'REPORT_DB_PASS' | sed "s/\(.*\)=\(.*\)/env[\1] = '\2'/" >> "$PHP_ENV_FILE"
|
||||
|
||||
# compat from older image where variable was not existing
|
||||
grep -e ^REPORT_DB_PORT "$PHP_ENV_FILE" || echo env[REPORT_DB_PORT] = 3306 >> "$PHP_ENV_FILE"
|
||||
|
||||
@@ -13,6 +13,7 @@ $dbuser = $ENV{'REPORT_DB_USER'};
|
||||
$dbpass = $ENV{'REPORT_DB_PASS'};
|
||||
$dbhost = $ENV{'REPORT_DB_HOST'}; # Set the hostname if we can't connect to the local socket.
|
||||
$dbport = $ENV{'REPORT_DB_PORT'} || 3306;
|
||||
$dbtype = $ENV{'REPORT_DB_TYPE'} || 'mysql';
|
||||
|
||||
if(exists $ENV{PARSER_IMAP_SERVER_WITH_PORT} && defined $ENV{PARSER_IMAP_SERVER_WITH_PORT}) {
|
||||
my @server_attr = split ':', $ENV{PARSER_IMAP_SERVER_WITH_PORT};
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// ### configuration ##################################################
|
||||
// ####################################################################
|
||||
|
||||
$dbtype=getenv('REPORT_DB_TYPE');
|
||||
$dbhost=getenv('REPORT_DB_HOST');
|
||||
$dbport=getenv('REPORT_DB_PORT');
|
||||
$dbname=getenv('REPORT_DB_NAME');
|
||||
|
||||
Reference in New Issue
Block a user