From ae79445ec05a243666ec42232db775560ba665a5 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Wed, 27 Sep 2017 19:48:25 +0200 Subject: [PATCH] ACME needs to wait for MySQL to be ready --- data/Dockerfiles/acme/docker-entrypoint.sh | 5 +++++ docker-compose.yml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/data/Dockerfiles/acme/docker-entrypoint.sh b/data/Dockerfiles/acme/docker-entrypoint.sh index 2cfe8224..f5830ce0 100755 --- a/data/Dockerfiles/acme/docker-entrypoint.sh +++ b/data/Dockerfiles/acme/docker-entrypoint.sh @@ -80,6 +80,11 @@ else fi fi +while ! mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS} --silent; do + echo "Waiting for database to come up..." + sleep 2 +done + while true; do if [[ "${SKIP_LETS_ENCRYPT}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then echo "SKIP_LETS_ENCRYPT=y, skipping Let's Encrypt..." diff --git a/docker-compose.yml b/docker-compose.yml index 62f0af86..28847e8e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -249,7 +249,8 @@ services: acme-mailcow: depends_on: - nginx-mailcow - image: mailcow/acme:1.19 + - mysql-mailcow + image: mailcow/acme:1.20 build: ./data/Dockerfiles/acme init: true dns: