[SOLVED] Batch provisioning

Good morning,

I have seen I’ll need to provision some Mattermost instances, different and isolated ones in the same server. I was wondering if there was the possibility of provisioning them through a script. I can easily create the database and it’s permissions… but if I remember correctly, Mattermost initialized the database and so, the first time you ran platform… can all this, through environmental variables or with arguments be passed to Mattermost instead of a set of a set of interactive questions?.

Can by the way, Mattermost detect the URL from where you are calling, and use a config file or another?.

Best regards,

If you wanted to run multiple instances of Mattermost on one server, I would recommend NGINX as a reverse proxy. This way, each instance of MM has it’s own domain and NGINX handles the “port forwarding” for you.

In terms of passing the settings, everything can be set in config.json.

I don’t think this has been scripted - I could probably modify my installer( https://github.com/hwcltjn/mattermost-installer ) at some point in the near future to help create additional instances on the same server.

In the meantime, if you look at the NGINX templates all you’d really need to do is modify the domain and port per vhost.

Let me know if you need any further help with this.

1 Like

Thanks a lot mate!!! :slight_smile:

1 Like