Nginx 502 bad gateway errors after Mattermost docker update

Basically th2 502 HTTP error means its a bad gateway, which could be at any point in your connection to the server, not specifically related to the configuration of the Mattermost installation itself. Its possible that it is caused from an upstream issue such as an authoritative domain name server going offline for your domain, a failure of one of your current DNS servers to resolve everything to your domain/server properly, etc. I would suggest checking your error.log file for Nginx in /var/log/ or /var/log/nginx/ to see if there are more details that can be determined from there.