Verified Commit 8e1117ad authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye 🌳
Browse files

Use pg_isready instead of a simple sleep 1 to be sure that the db is ready

parent 43c943bd
......@@ -68,7 +68,11 @@ if [ "$1" = 'mattermost' ]; then
# 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
until pg_isready -h $DB_HOST -p $DB_PORT_NUMBER
echo "Database is not ready yet. Waiting 5 seconds."
sleep 5
echo "Starting mattermost"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment