diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 4d61da19a8d..913a27641d0 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -18,7 +18,9 @@ function check_service () { # Keep these in sync with DATABASE_URL. echo "Checking database status at $DATABASE_URL" -if [[ ${DATABASE_URL:0:7} == "psql://" ]]; then +if [[ ${DATABASE_URL:0:27} == *"@host.docker.internal"* ]]; then + check_service "PostgreSQL" "host.docker.internal" 5432; +else check_service "PostgreSQL" "postgres" 5432; fi