How about an edit to the standard Discourse app, in which as soon as nginx is starting up, it serves a nicer “hang on a sec…the site may be under maintenance…try again in a moment” message, instead of the unintelligible (to the average user) “Bad Gateway 502” message.
Then after, say, 1 minute, the default 502 error can be served (in case there really is a bad gateway).
Not sure how to go about this though.