diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e5c2e4f..f4ebc53 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -27,8 +27,25 @@ php -v || { echo "PHP test failed"; exit 1; } echo "" echo "Environment variables loaded:" echo " DB_HOST_CREW: ${DB_HOST_CREW:-not set}" +echo " DB_NAME_CREW: ${DB_NAME_CREW:-not set}" +echo " DB_USER_CREW: ${DB_USER_CREW:-not set}" echo " DB_HOST_MERCHBAY: ${DB_HOST_MERCHBAY:-not set}" +echo " DB_NAME_MERCHBAY: ${DB_NAME_MERCHBAY:-not set}" +echo " DB_USER_MERCHBAY: ${DB_USER_MERCHBAY:-not set}" echo " SMTP_HOST: ${SMTP_HOST:-not set}" +echo "" + +# Test DNS resolution for database hosts +echo "Testing database host DNS resolution..." +if [ -n "${DB_HOST_CREW}" ]; then + echo -n " Crew DB (${DB_HOST_CREW}): " + getent hosts "${DB_HOST_CREW}" > /dev/null 2>&1 && echo "✓ Resolved" || echo "✗ Cannot resolve" +fi +if [ -n "${DB_HOST_MERCHBAY}" ]; then + echo -n " MerchBay DB (${DB_HOST_MERCHBAY}): " + getent hosts "${DB_HOST_MERCHBAY}" > /dev/null 2>&1 && echo "✓ Resolved" || echo "✗ Cannot resolve" +fi +echo "" # Start crond in background echo "" diff --git a/send_report.php b/send_report.php index 73b912c..90b0cd1 100644 --- a/send_report.php +++ b/send_report.php @@ -1,6 +1,6 @@