Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Functional Programming
Diskuy-Backend
Commits
10c6f336
Commit
10c6f336
authored
Feb 20, 2021
by
Muhammad Rafif Elfazri
Browse files
Update deploy script with waiting for database server to start
parent
657471d7
Changes
1
Show whitespace changes
Inline
Side-by-side
entrypoint.sh
View file @
10c6f336
...
...
@@ -3,14 +3,14 @@
# docker entrypoint script.
# assign a default for the database_user
#
DB_USER=${DATABASE_USER:-postgres}
DB_USER
=
${
DATABASE_USER
:-
postgres
}
#
# wait until Postgres is ready
#
while ! pg_isready -q -h $DATABASE_HOST -p 5432 -U $DB_USER
#
do
#
echo "$(date) - waiting for database to start"
#
sleep 2
#
done
# wait until Postgres is ready
while
!
pg_isready
-q
-h
$DATABASE_HOST
-p
5432
-U
$DB_USER
do
echo
"
$(
date
)
- waiting for database to start"
sleep
2
done
bin
=
"/app/bin/diskuy"
eval
"
$bin
eval
\"
Diskuy.Release.migrate
\"
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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