mirror of
https://github.com/gutmensch/docker-dmarc-report.git
synced 2025-12-29 16:15:55 +00:00
@@ -13,32 +13,5 @@ fi
|
|||||||
procs=$(cat /proc/cpuinfo | grep processor | wc -l)
|
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
|
||||||
|
|
||||||
# Very dirty hack to replace variables in code with ENVIRONMENT values
|
|
||||||
if [[ -v TEMPLATE_NGINX_HTML ]] ; then
|
|
||||||
for i in $(env)
|
|
||||||
do
|
|
||||||
variable=$(echo "$i" | cut -d'=' -f1)
|
|
||||||
value=$(echo "$i" | cut -d'=' -f2)
|
|
||||||
if [[ "$variable" != '%s' ]] ; then
|
|
||||||
replace='\$\$_'${variable}'_\$\$'
|
|
||||||
find /var/www/viewer -type f -exec sed -i -e 's#'${replace}'#'${value}'#g' {} \;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Very dirty hack to replace variables in conf with ENVIRONMENT values
|
|
||||||
if [[ -v TEMPLATE_PERL_CONF ]] ; then
|
|
||||||
for i in $(env)
|
|
||||||
do
|
|
||||||
variable=$(echo "$i" | cut -d'=' -f1)
|
|
||||||
value=$(echo "$i" | cut -d'=' -f2)
|
|
||||||
if [[ "$variable" != '%s' ]] ; then
|
|
||||||
replace='\$\$_'${variable}'_\$\$'
|
|
||||||
find /usr/bin -type f -name *.conf -exec sed -i -e 's#'${replace}'#'${value}'#g' {} \;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start supervisord and services
|
# Start supervisord and services
|
||||||
/usr/bin/supervisord -n -c /etc/supervisord.conf
|
/usr/bin/supervisord -n -c /etc/supervisord.conf
|
||||||
|
|
||||||
|
|||||||
@@ -8,26 +8,26 @@
|
|||||||
$debug = 0;
|
$debug = 0;
|
||||||
$delete_reports = 0;
|
$delete_reports = 0;
|
||||||
|
|
||||||
$dbname = '$$_REPORT_DB_NAME_$$';
|
$dbname = $ENV{'REPORT_DB_NAME'};
|
||||||
$dbuser = '$$_REPORT_DB_USER_$$';
|
$dbuser = $ENV{'REPORT_DB_USER'};
|
||||||
$dbpass = '$$_REPORT_DB_PASS_$$';
|
$dbpass = $ENV{'REPORT_DB_PASS'};
|
||||||
$dbhost = '$$_REPORT_DB_HOST_$$'; # Set the hostname if we can't connect to the local socket.
|
$dbhost = $ENV{'REPORT_DB_HOST'}; # Set the hostname if we can't connect to the local socket.
|
||||||
|
|
||||||
$imapserver = '$$_PARSER_IMAP_SERVER_WITH_PORT_$$';
|
$imapserver = $ENV{'PARSER_IMAP_SERVER_WITH_PORT'};
|
||||||
$imapuser = '$$_PARSER_IMAP_USER_$$';
|
$imapuser = $ENV{'PARSER_IMAP_USER'};
|
||||||
$imappass = '$$_PARSER_IMAP_PASS_$$';
|
$imappass = $ENV{'PARSER_IMAP_PASS'};
|
||||||
$imapssl = '0'; # If set to 1, remember to change server port to 993 and disable imaptls.
|
$imapssl = $ENV{'PARSER_IMAP_SSL'} // '0'; # If set to 1, remember to change server port to 993 and disable imaptls.
|
||||||
$imaptls = '1'; # Enabled as the default and best-practice.
|
$imaptls = $ENV{'PARSER_IMAP_TLS'} // '1'; # Enabled as the default and best-practice.
|
||||||
$tlsverify = '0'; # Enable verify server cert as the default and best-practice.
|
$tlsverify = $ENV{'PARSER_IMAP_VERIFY'} // '0'; # Enable verify server cert as the default and best-practice.
|
||||||
$imapignoreerror = 0; # set it to 1 if you see an "ERROR: message_string()
|
$imapignoreerror = 0; # set it to 1 if you see an "ERROR: message_string()
|
||||||
# expected 119613 bytes but received 81873 you may
|
# expected 119613 bytes but received 81873 you may
|
||||||
# need the IgnoreSizeErrors option" because of malfunction
|
# need the IgnoreSizeErrors option" because of malfunction
|
||||||
# imap server as MS Exchange 2007, ...
|
# imap server as MS Exchange 2007, ...
|
||||||
$imapreadfolder = '$$_PARSER_IMAP_READ_FOLDER_$$';
|
$imapreadfolder = $ENV{'PARSER_IMAP_READ_FOLDER'};
|
||||||
|
|
||||||
# If $imapmovefolder is set, processed IMAP messages will be moved (overruled by
|
# If $imapmovefolder is set, processed IMAP messages will be moved (overruled by
|
||||||
# the --delete option!)
|
# the --delete option!)
|
||||||
$imapmovefolder = '$$_PARSER_IMAP_MOVE_FOLDER_$$';
|
$imapmovefolder = $ENV{'PARSER_IMAP_MOVE_FOLDER'};
|
||||||
|
|
||||||
# maximum size of XML files to store in database, long files can cause transaction aborts
|
# maximum size of XML files to store in database, long files can cause transaction aborts
|
||||||
$maxsize_xml = 50000;
|
$maxsize_xml = 50000;
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
// ### configuration ##################################################
|
// ### configuration ##################################################
|
||||||
// ####################################################################
|
// ####################################################################
|
||||||
|
|
||||||
$dbhost='$$_REPORT_DB_HOST_$$';
|
$dbhost=getenv('REPORT_DB_HOST');
|
||||||
$dbname='$$_REPORT_DB_NAME_$$';
|
$dbname=getenv('REPORT_DB_NAME');
|
||||||
$dbuser='$$_REPORT_DB_USER_$$';
|
$dbuser=getenv('REPORT_DB_USER');
|
||||||
$dbpass='$$_REPORT_DB_PASS_$$';
|
$dbpass=getenv('REPORT_DB_PASS');
|
||||||
$dbport='3306';
|
$dbport='3306';
|
||||||
|
|
||||||
$cssfile="default.css";
|
$cssfile="default.css";
|
||||||
|
|||||||
Reference in New Issue
Block a user