Since the Tor project now has documentation about the Onion-Location header, I’d be interested to see how it is possible to configure Discourse to serve both a “surface domain” and an onion.
It seems to me that @BryanHR’s tweaks can be done in the container’s YAML configuration. I suppose the Onion-Location header could be added the same way.
But I seem to remember that Discourse is wired to its original host, so I’m worried that access to an .onion site would serve resources over normal HTTP or HTTPS without going through the Tor network. (E.g., the original request is made through Tor, but the JavaScript uses the original domain to get additional assets).