How to secure Mattermost on docker and a few more questions

UPDATE: I checked the data and the database I am really using is the one inside the ENV file. But if I change the password to it I still get a 502 bad gateway, so it means that the config file is really not a reference. What should I do?

this is the command I am using for starting and stopping everything:

sudo docker compose -f docker-compose.yml -f docker-compose.nginx.yml up -d
sudo docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml down