502 bad gateway with clean rebuild and no plugins except discourse docker

The Rails server hasn’t come up for some reason.

That’s why there is nothing on port 3000.

Check why with this (and share):

/var/discourse/shared/standalone/log/rails# tail production.log

(or if you need more, say: /var/discourse/shared/standalone/log/rails# tail -n 200 production.log)