From b57346b185e530974ce6ebcc6e8e9b1e01250ac1 Mon Sep 17 00:00:00 2001 From: cpanato Date: Mon, 1 Oct 2018 13:41:01 +0200 Subject: [PATCH 1/2] fix check --- app/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/entrypoint.sh b/app/entrypoint.sh index 134772bb..e2171771 100755 --- a/app/entrypoint.sh +++ b/app/entrypoint.sh @@ -67,7 +67,7 @@ if [ "$1" = 'mattermost' ]; then echo "Using existing config file" $MM_CONFIG fi - if [ ! -z "$DB_HOST" ] + if [ -z "$MM_SQLSETTINGS_DATASOURCE" ] && [ ! -f $MM_CONFIG ] then # Wait for database to be reachable echo "Wait until database $DB_HOST:$DB_PORT_NUMBER is ready..." From b3cc277b2c59709617566c6b4184524b559f4a62 Mon Sep 17 00:00:00 2001 From: cpanato Date: Tue, 2 Oct 2018 11:32:08 +0200 Subject: [PATCH 2/2] remove db check --- app/entrypoint.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/entrypoint.sh b/app/entrypoint.sh index e2171771..b00d537d 100755 --- a/app/entrypoint.sh +++ b/app/entrypoint.sh @@ -67,16 +67,6 @@ if [ "$1" = 'mattermost' ]; then echo "Using existing config file" $MM_CONFIG fi - if [ -z "$MM_SQLSETTINGS_DATASOURCE" ] && [ ! -f $MM_CONFIG ] - then - # Wait for database to be reachable - echo "Wait until database $DB_HOST:$DB_PORT_NUMBER is ready..." - until nc -z $DB_HOST $DB_PORT_NUMBER - do - sleep 1 - done - fi - # Wait another second for the database to be properly started. # Necessary to avoid "panic: Failed to open sql connection pq: the database system is starting up" sleep 1