Skip to content

Commit

Permalink
Make sure to wait for permissions to be set
Browse files Browse the repository at this point in the history
  • Loading branch information
graveland committed Dec 20, 2024
1 parent 7587a4f commit 8155cdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"' "$@"'
}
Expand Down

0 comments on commit 8155cdc

Please sign in to comment.