NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

ACME needs to wait for MySQL to be ready

ae79445e
Michael Kuron <[email protected]> 9 years ago
data/Dockerfiles/acme/docker-entrypoint.sh | 5 +++++
 docker-compose.yml                         | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

Diff

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: