It turns out I had Azure to blame for my troubles. When Azure installed Gitlab, they had created a random long url which worked for their internal network feature. Once I changed it to http://dev.mydomain.com, it worked out fine.
Now I have Mattermost up and running. But there is a new problem. Instead of speaking to my gitlab at dev.mydomain.com, Mattermost is speaking to it at the older long url created by Azure.
I cant seem to find any place in the configuration where I can change that.
Time to read more documentation.
~_~