From 87c8befebe7e2432153ec43c5a8c84d5462cd8c6 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Wed, 22 Nov 2023 22:50:43 +0000 Subject: [PATCH] Fix (docker): Use `127.0.0.1` instead of `localhost` to test snappymail in `entrypoint.sh` --- .docker/release/files/entrypoint.sh | 8 ++++---- .docker/release/files/etc/nginx/nginx.conf | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.docker/release/files/entrypoint.sh b/.docker/release/files/entrypoint.sh index 3db1d0156..75e82d729 100755 --- a/.docker/release/files/entrypoint.sh +++ b/.docker/release/files/entrypoint.sh @@ -62,17 +62,17 @@ sed 's/^auth_logging_format = .*/auth_logging_format = "[{date:Y-m-d H:i:s}] Aut sed 's/^auth_syslog = .*/auth_syslog = Off/' -i $SNAPPYMAIL_CONFIG_FILE ( - while ! nc -vz -w 1 localhost 8888 > /dev/null 2>&1; do echo "[INFO] Checking whether nginx is alive"; sleep 1; done - while ! nc -vz -w 1 localhost 9000 > /dev/null 2>&1; do echo "[INFO] Checking whether php-fpm is alive"; sleep 1; done + while ! nc -vz -w 1 127.0.0.1 8888 > /dev/null 2>&1; do echo "[INFO] Checking whether nginx is alive"; sleep 1; done + while ! nc -vz -w 1 127.0.0.1 9000 > /dev/null 2>&1; do echo "[INFO] Checking whether php-fpm is alive"; sleep 1; done # Create snappymail admin password if absent SNAPPYMAIL_ADMIN_PASSWORD_FILE=/var/lib/snappymail/_data_/_default_/admin_password.txt if [ ! -f "$SNAPPYMAIL_ADMIN_PASSWORD_FILE" ]; then echo "[INFO] Creating Snappymail admin password file: $SNAPPYMAIL_ADMIN_PASSWORD_FILE" - wget -T 1 -qO- 'http://localhost:8888/?/AdminAppData/0/12345/' > /dev/null + wget -T 1 -qO- 'http://127.0.0.1:8888/?/AdminAppData/0/12345/' > /dev/null echo "[INFO] Snappymail Admin Panel ready at http://localhost:8888/?admin. Login using password in $SNAPPYMAIL_ADMIN_PASSWORD_FILE" fi - wget -T 1 -qO- 'http://localhost:8888/' > /dev/null + wget -T 1 -qO- 'http://127.0.0.1:8888/' > /dev/null echo "[INFO] Snappymail ready at http://localhost:8888/" ) & diff --git a/.docker/release/files/etc/nginx/nginx.conf b/.docker/release/files/etc/nginx/nginx.conf index 552b4c385..ed87cb201 100644 --- a/.docker/release/files/etc/nginx/nginx.conf +++ b/.docker/release/files/etc/nginx/nginx.conf @@ -52,7 +52,6 @@ http { server { listen 8888; - listen [::]:8888; root /snappymail; index index.php; charset utf-8;