mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Fix (docker): Use 127.0.0.1 instead of localhost to test snappymail in entrypoint.sh (#1325)
* Fix (docker): Use `127.0.0.1` instead of `localhost` to test snappymail in `entrypoint.sh` * Run build on PR but don't push * Login only on tags * Fix test
This commit is contained in:
parent
60964c9869
commit
60700a56e9
3 changed files with 16 additions and 9 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
|
||||
|
||||
(
|
||||
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/"
|
||||
) &
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue