From db206d78b220e08493ed3f82e0fa7bcce3d72424 Mon Sep 17 00:00:00 2001
From: Florent Gluck <florent.gluck@hesge.ch>
Date: Tue, 3 Nov 2020 11:06:56 +0100
Subject: [PATCH] Initial README.md for mattermost

---
 Mattermost/README.md | 94 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)
 create mode 100644 Mattermost/README.md

diff --git a/Mattermost/README.md b/Mattermost/README.md
new file mode 100644
index 0000000..6f5dd16
--- /dev/null
+++ b/Mattermost/README.md
@@ -0,0 +1,94 @@
+# Mattermost
+
+## Introduction
+
+This installation follows the guidelines from this github repository which deploys it using Docker, "Production Docker deployment for Mattermost": [https://github.com/mattermost/mattermost-docker](https://github.com/mattermost/mattermost-docker)
+
+To install a native version, follow the following article "Installing Mattermost on Ubuntu 18.04 LTS": [https://docs.mattermost.com/install/install-ubuntu-1804.html](https://docs.mattermost.com/install/install-ubuntu-1804.html).
+
+## Initial Setup
+
+Our install is based on system running Ubuntu Server 20.04 LTS.
+
+First, update the system and install the following packages (important to install certbot as a snap package otherwise it won't up-to-date):
+```
+sudo apt-get update && apt-get upgrade -y
+sudo apt-get install -y docker.io docker-compose git
+sudo snap install --classic certbot
+```
+
+Add your user to the docker group:
+```
+sudo usermod -a -G docker ubuntu
+```
+
+Then, logout and login again for the new group to take effect.
+
+## Mattermost configuration
+
+Clone of the repository:
+```
+git clone https://github.com/mattermost/mattermost-docker
+```
+
+Edit the `docker-compose.yml` file to:
+
+1) in `app` service in `build` section, specify the Team Edition; change:
+```
+  app:
+    build:
+      context: app
+      # uncomment following lines for team edition or change UID/GID
+      # args:
+      #  - edition=team
+```
+to:
+```
+  app:
+    build:
+      context: app
+      # uncomment following lines for team edition or change UID/GID
+      args:
+        - edition=team
+```
+
+2) In `db` service in `environment` section, set the postgress password; change:
+```
+- POSTGRES_PASSWORD=mmuser_password
+```
+to:
+```
+- POSTGRES_PASSWORD=W2dE!9I.n64S
+```
+
+3) In `app` service in `environment` section, set the postgress password as well; change:
+```
+- MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:mmuser_password@db:5432/mattermost?sslmode=disable&connect_timeout=10
+```
+to:
+```
+- MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:W2dE!9I.n64S@db:5432/mattermost?sslmode=disable&connect_timeout=10
+```
+
+4) In `app` service in `environment` section, set the mattermost password; change:
+```
+- MM_PASSWORD=mmuser_password
+```
+to:
+```
+- MM_PASSWORD=zy5dn8yh%Fuh
+```
+
+## Setup a nginx reverse-proxy
+
+This is probably desirable.
+
+TODO
+
+## TLS (https) configuration
+
+TODO
+
+- https://certbot.eff.org/lets-encrypt/ubuntufocal-other
+- https://docs.bitnami.com/installer/apps/mattermost/administration/generate-configure-certificate-letsencrypt/
+
-- 
GitLab