Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Picasoft
Technique
Dockerfiles
Commits
8e1117ad
Verified
Commit
8e1117ad
authored
May 19, 2021
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
pica-mattermost/entrypoint.sh
View file @
8e1117ad
...
...
@@ -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
do
echo
"Database is not ready yet. Waiting 5 seconds."
sleep
5
done
echo
"Starting mattermost"
fi
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment