The word "city" is a metonym for the people who lived in the city. Here the word "whole" is probably a generalization to emphasize that most people from the city gathered. Alternate translation: "Many people from that city gathered outside the door" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-hyperbole]])