IPv6 is used extensively on their own hosting, so Discourse itself is compatible with IPv6.
Can you show more of the logs? The actual error is above the section you included. A wild guess is that something in your config is causing a problem pulling stuff from github. I don’t see any AAAA records for github, so that may be the issue. And there’s this: