502 Gateway after renewing cert

The problem has been solved, albeit with a brute-force solution. I backed up the contents of the /volumes directory then created a new EC2 instance. I installed Mattermost following these steps and not the confusing and ultimately incorrect steps in the repo README. Then restored the /volumes directory

git clone https://github.com/mattermost/mattermost-docker.git
cd mattermost-docker
git checkout release-5.30 # There is a significant known Postgres issue with 5.31
docker-compose build
mkdir -pv ./volumes/app/mattermost/{data,logs,config,plugins,client-plugins}
sudo chown -R 1000:1000 ./volumes/app/mattermost/ # Should match app:args:PUID in docker-compose.yml
docker-compose up -d
certbot certonly --standalone -d {domain-name}
cp {path-to-certbot}/cert.pem volumes/web/cert 
cp {path-to-certbot}/privkey.pem volumes/web/cert/key-no-password.pem
1 Like