mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 09:27:03 +03:00
Fix (docker): Use 127.0.0.1 instead of localhost to test snappymail in entrypoint.sh
This commit is contained in:
parent
1e597f9cd7
commit
87c8befebe
2 changed files with 4 additions and 5 deletions
|
|
@ -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
|
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 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 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 9000 > /dev/null 2>&1; do echo "[INFO] Checking whether php-fpm is alive"; sleep 1; done
|
||||||
# Create snappymail admin password if absent
|
# Create snappymail admin password if absent
|
||||||
SNAPPYMAIL_ADMIN_PASSWORD_FILE=/var/lib/snappymail/_data_/_default_/admin_password.txt
|
SNAPPYMAIL_ADMIN_PASSWORD_FILE=/var/lib/snappymail/_data_/_default_/admin_password.txt
|
||||||
if [ ! -f "$SNAPPYMAIL_ADMIN_PASSWORD_FILE" ]; then
|
if [ ! -f "$SNAPPYMAIL_ADMIN_PASSWORD_FILE" ]; then
|
||||||
echo "[INFO] Creating Snappymail admin password file: $SNAPPYMAIL_ADMIN_PASSWORD_FILE"
|
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"
|
echo "[INFO] Snappymail Admin Panel ready at http://localhost:8888/?admin. Login using password in $SNAPPYMAIL_ADMIN_PASSWORD_FILE"
|
||||||
fi
|
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/"
|
echo "[INFO] Snappymail ready at http://localhost:8888/"
|
||||||
) &
|
) &
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ http {
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8888;
|
listen 8888;
|
||||||
listen [::]:8888;
|
|
||||||
root /snappymail;
|
root /snappymail;
|
||||||
index index.php;
|
index index.php;
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue