Discourse Bad Gateway after reboot

You might consider posting your stats related to memory.

For example, on Linux:

$ free -m
              total        used        free      shared  buff/cache   available
Mem:          64299       12955        9678         361       41664       50265
Swap:          7807          69        7738

and for docker stats, post the output of

docker stats

etc.

The error is related to a lack of memory.