diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index c6e0d1cab..dfa7cfc65 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -15,8 +15,42 @@ map_uidgid() { fi } + +wait_for_postgres() { + attempt_num=1 + max_attempts=5 + + echo "Waiting for PostgreSQL to start..." + + host="${PAPERLESS_DBHOST}" + + while !