Discourse not using brotli or gzip compression?

Well there is your problem, it is proxying stuff and not passing stuff through properly.

I would recommend just keeping to our standard install which directly connects the internet to our container and handles all this stuff for you.