Error: failed to load configuration: failed to load: invalid config: Config.IsValid: model.config.is_valid.site_url.app_error


I am setting up mattermost docker team edition with mariadb in an internal company network. This is my configuration with .env. I test and deploy this from home network and it seems to work fine; however, trying to deploy again with the ./ command from within internal network I get the following error:

Error: failed to load configuration: failed to create store: unable to load on store creation: invalid config: Config.IsValid: model.config.is_valid.site_url.app_error

Does anyone have any suggestions what I may be doing incorrectly?

It seems like your ServiceSettings.SiteURL is not correctly formed. This error is thrown when it fails to parse the SiteURL. It’s a different thing that we are swallowing the actual error, I’ll create a fix for that. But I think somehow your .env file is not passing the full MM_SERVICESETTINGS_SITEURL properly.

How does this same config deploy successfully on my home setup but not when deploying it internally on the company network?

What version of docker team edition would this be included in and whats the wait? I assume it may take a while. What would be a solution in the mean time?

I did a quick comparison of bot my .env and the official docker .env. Seems to be the same. Am I missing something?

I am trying to deploy it on localhost:8065 without nginx

Is there a way you can dump the MM_SERVICESETTINGS_SITEURL value before starting the server? Without seeing the actual value, it’s hard for me to say anything.

I was able to go into the container. echo $MM_SERVICESSETTINGS_SITEURL is empty. I went into the config and that parameter showed empty parenthesis "".

This is the only closest and related issue I could find. Unfortunately this was with the older mattermost docker repo where the dockerfile was exposed to make the edi possiblet. Im not entirely sure if that is correct.

Second update. I did more searching and I stumbled upon this Issue on the current docker mattermost repo.

Which sites the following:

@VA2XJM what docker-compose version do you use? The variable interpolation within variables is only available since >1.26. If you download the latest version it should work.

I currently have docker-compose v1.24. I cant update the version yet within my network so in the mean time I change .env from MM_SERVICESETTINGS_SITEURL=https://${DOMAIN} to MM_SERVICESETTINGS_SITEURL= and it resolves the error.

Nice sleuthing @advra !

1 Like