mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-24 15:31:26 +00:00
use DOCKER_DB_HOST_PORT when checking if database is ready or not
This commit is contained in:
parent
dbc5df849f
commit
e227ee1bd5
1 changed files with 2 additions and 2 deletions
|
@ -467,14 +467,14 @@ function await-database-ready()
|
||||||
case "${DB_CONNECTION:-}" in
|
case "${DB_CONNECTION:-}" in
|
||||||
mysql)
|
mysql)
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
while ! echo "SELECT 1" | mysql --user="${DB_USERNAME}" --password="${DB_PASSWORD}" --host="${DB_HOST}" "${DB_DATABASE}" --silent >/dev/null; do
|
while ! echo "SELECT 1" | mysql --user="${DB_USERNAME}" --password="${DB_PASSWORD}" --host="${DB_HOST}" --port="${DOCKER_DB_HOST_PORT}" "${DB_DATABASE}" --silent >/dev/null; do
|
||||||
staggered-sleep
|
staggered-sleep
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
pgsql)
|
pgsql)
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
while ! echo "SELECT 1" | PGPASSWORD="${DB_PASSWORD}" psql --user="${DB_USERNAME}" --host="${DB_HOST}" "${DB_DATABASE}" >/dev/null; do
|
while ! echo "SELECT 1" | PGPASSWORD="${DB_PASSWORD}" psql --user="${DB_USERNAME}" --host="${DB_HOST}" --port="${DOCKER_DB_HOST_PORT}" "${DB_DATABASE}" >/dev/null; do
|
||||||
staggered-sleep
|
staggered-sleep
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue