Browse Source

Merge pull request #638 from mkuron/acme

ACME needs to wait for MySQL to be ready
Michael Kuron 8 years ago
parent
commit
752a571607
2 changed files with 7 additions and 1 deletions
  1. 5 0
      data/Dockerfiles/acme/docker-entrypoint.sh
  2. 2 1
      docker-compose.yml

+ 5 - 0
data/Dockerfiles/acme/docker-entrypoint.sh

@@ -84,6 +84,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
 		log_f "SKIP_LETS_ENCRYPT=y, skipping Let's Encrypt..."

+ 2 - 1
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: