From 8155cdc344a2bb2ac3b05d6255db52a03e2b2049 Mon Sep 17 00:00:00 2001 From: Brent Graveland Date: Fri, 20 Dec 2024 12:47:58 -0700 Subject: [PATCH] Make sure to wait for permissions to be set --- docker-entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5e7ffc1a..99918705 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -114,6 +114,8 @@ docker_init_database_dir() { set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@" fi + permission_wait_loop + # --pwfile refuses to handle a properly-empty file (hence the "\n"): https://github.com/docker-library/postgres/issues/1025 eval 'initdb --username="$POSTGRES_USER" --pwfile=<(printf "%s\n" "$POSTGRES_PASSWORD") '"$POSTGRES_INITDB_ARGS"' "$@"' }