Sourcevoid Docs

Everything you need to get started with Sourcevoid, pick your favorite language and let's get started!

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Deploy Mattermost


Download and unpack Mattermost

Go to the Mattermost website and download the latest Linux version of Mattermost. Then unpackage the archive:

# Unpack archive 
tar -zxvf mattermost-3.10.0-linux-amd64.tar.gz 

Add a sourcevoid.yaml file

Unpack the package and add a sourcevoid.yaml config like this one:

runtime: go

# Set container size to 2 SU (change it needed)
container_size: 2

# Default path to Mattermost binary
start: ./bin/platform

Edit config/config.json

Open the file config/config.json and change the settings to use these values:

    "ServiceSettings": {
        "ListenAddress": ":8080",
      "TeamSettings": {
        "SiteName": "Mattermost on Sourcevoid",
      "FileSettings": {
        "Directory": "/home/cuser/disks/mattermost",

Note that this is not a complete config above, just the changed values. Edit them in the existing JSON file and keep all other values. You can "SiteName" to any value you want.

Package it back up

# Create zip file (if other archive if you prefer)
zip -r .

Create a pool

If you don't already have a cloud pool you want to use, create a new one.

Create a database

Create a database called "mattermost" using the UI, MySQL or PostgreSQL should both work. During the test of this tutorial we used MySQL.

Create a Sourcevoid app and attach database

Create a Sourcevoid app called "mattermost" using the UI, after you have created the app, attach the database to the app before deploying. Click the "Databases" menu then on "MySQL", then on the "Manage" button on the "Credentials" column of the table for the mattermost database you created earlier. Select the mattermost app and press "Add".

Adjust database secret key (environment variable)

Go to the "mattermost" app and click on "Secrets", create a new secret with key "MM_SQLSETTINGS_DATASOURCE" and set the value to mattermost database string format:

# Example
  • Replace xxx above with the contents of the MYSQL_PASSWORD secret.
  • Replace with the contents of the MYSQL_HOST secret.
  • Note that the mattermost in the begining and end assumes you named your database "mattermost", if you used a different name then replace mattermost with that name also.

This makes it so that Mattermost gets the correct MySQL connection URI.

Create a data disk for uploads

Create a data disk called "mattermost" using the UI, then attach it to the mattermost app.

Deploy Mattermost

Click "Deploy" in the menu then "Source Archive" and deploy the zip archive you created above.

Deploy Mattermost