Skip to content

Commit

Permalink
Set default for ports
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsondatadev authored Mar 15, 2024
1 parent aa02788 commit 65af3f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MYSQL='mysql'
POSTGRES='postgres'

if [ "${METASTORE_TYPE}" = "${MYSQL}" ]; then
METASTORE_DB_HOSTNAME=${METASTORE_DB_HOSTNAME:-3306} # Default to 3306
echo "Waiting for database on ${METASTORE_DB_HOSTNAME} to launch on ${METASTORE_DB_PORT} ..."
while ! nc -z ${METASTORE_DB_HOSTNAME} ${METASTORE_DB_PORT}; do
sleep 1
Expand All @@ -23,6 +24,7 @@ if [ "${METASTORE_TYPE}" = "${MYSQL}" ]; then
fi

if [ "${METASTORE_TYPE}" = "${POSTGRES}" ]; then
METASTORE_DB_HOSTNAME=${METASTORE_DB_HOSTNAME:-5432} # Default to 5432
echo "Waiting for database on ${METASTORE_DB_HOSTNAME} to launch on ${METASTORE_DB_PORT} ..."
while ! nc -z ${METASTORE_DB_HOSTNAME} ${METASTORE_DB_PORT}; do
sleep 1
Expand Down

0 comments on commit 65af3f1

Please sign in to comment.