From a8cd17b1b319dd3972da6aebde4513180f430e46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?PICHOU=20Ky=C3=A2ne?= <kyane.pichou@etu.utc.fr>
Date: Sat, 4 Mar 2017 18:14:01 +0100
Subject: [PATCH] Remove mattermost folder (just a git clone, not relevant here

---
 mattermost/.travis.yml                        |  22 ---
 mattermost/Dockerrun.aws.json                 |  60 ------
 mattermost/LICENSE                            | 176 ------------------
 mattermost/README.aws.md                      |  13 --
 mattermost/README.md                          | 122 ------------
 mattermost/app/Dockerfile                     |  15 --
 mattermost/app/config.template.json           |  95 ----------
 mattermost/app/docker-entry.sh                |  33 ----
 mattermost/contrib/kubernetes/README.md       | 110 -----------
 .../kubernetes/mattermost.deployment.yaml     |  61 ------
 .../contrib/kubernetes/mattermost.secret.yaml |  19 --
 .../contrib/kubernetes/mattermost.svc.yaml    |  15 --
 mattermost/db/Dockerfile                      |  19 --
 mattermost/db/docker-entrypoint1.sh           |  51 -----
 mattermost/db/make_db.sh                      |  12 --
 mattermost/db/setup-wale.sh                   |  11 --
 mattermost/docker-compose-v1.yml              |  39 ----
 mattermost/docker-compose.yml                 |  41 ----
 mattermost/web/Dockerfile                     |  22 ---
 mattermost/web/docker-entry.sh                |   9 -
 mattermost/web/mattermost                     |  22 ---
 mattermost/web/mattermost-ssl                 |  39 ----
 22 files changed, 1006 deletions(-)
 delete mode 100644 mattermost/.travis.yml
 delete mode 100644 mattermost/Dockerrun.aws.json
 delete mode 100644 mattermost/LICENSE
 delete mode 100644 mattermost/README.aws.md
 delete mode 100644 mattermost/README.md
 delete mode 100644 mattermost/app/Dockerfile
 delete mode 100644 mattermost/app/config.template.json
 delete mode 100644 mattermost/app/docker-entry.sh
 delete mode 100644 mattermost/contrib/kubernetes/README.md
 delete mode 100644 mattermost/contrib/kubernetes/mattermost.deployment.yaml
 delete mode 100644 mattermost/contrib/kubernetes/mattermost.secret.yaml
 delete mode 100644 mattermost/contrib/kubernetes/mattermost.svc.yaml
 delete mode 100644 mattermost/db/Dockerfile
 delete mode 100755 mattermost/db/docker-entrypoint1.sh
 delete mode 100644 mattermost/db/make_db.sh
 delete mode 100644 mattermost/db/setup-wale.sh
 delete mode 100644 mattermost/docker-compose-v1.yml
 delete mode 100644 mattermost/docker-compose.yml
 delete mode 100644 mattermost/web/Dockerfile
 delete mode 100644 mattermost/web/docker-entry.sh
 delete mode 100644 mattermost/web/mattermost
 delete mode 100644 mattermost/web/mattermost-ssl

diff --git a/mattermost/.travis.yml b/mattermost/.travis.yml
deleted file mode 100644
index 04ced962..00000000
--- a/mattermost/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-sudo: required
-
-services:
-    - docker
-
-before_install:
-    - docker build -t mattermost-prod-db db
-    - docker build -t mattermost-prod-app app
-
-install:
-    - eval $BUILD
-    - sleep 10
-
-env:
-    - BUILD="docker-compose up -d"
-    - BUILD="docker run -d --name db mattermost-prod-db && sleep 5 && docker run -d --link db -p 80:80 --name app mattermost-prod-app"
-
-script:
-    - curl -sSf http://localhost > /dev/null
-
-after_failure:
-    - timeout 3s docker-compose logs app db web
diff --git a/mattermost/Dockerrun.aws.json b/mattermost/Dockerrun.aws.json
deleted file mode 100644
index 49d4191d..00000000
--- a/mattermost/Dockerrun.aws.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
-    "AWSEBDockerrunVersion": "2",
-    "volumes": [
-        {
-            "name": "app-config",
-            "host": {
-                "sourcePath": "/var/app/current/app/mattermost/config"
-            }
-        },
-        {
-            "name": "app-data",
-            "host": {
-                "sourcePath": "/var/app/current/app/mattermost/data"
-            }
-        },
-        {
-            "name": "db-data",
-            "host": {
-                "sourcePath": "/var/app/current/db/mattermost/var/lib/postgresql/data"
-            }
-        }
-    ],
-    "containerDefinitions": [
-        {
-            "name": "app",
-            "image": "mattermost/mattermost-prod-app:latest",
-            "memory": 128,
-            "mountPoints": [
-                {
-                    "sourceVolume": "app-config",
-                    "containerPath": "/mattermost/config"
-                },
-                {
-                    "sourceVolume": "app-data",
-                    "containerPath": "/mattermost/data"
-                }
-            ],
-            "portMappings": [
-                {
-                    "hostPort": 80,
-                    "containerPort": 80
-                }
-            ],
-            "links": [
-                "db"
-            ]
-        },
-        {
-            "name": "db",
-            "image": "mattermost/mattermost-prod-db:latest",
-            "memory": 128,
-            "mountPoints": [
-                {
-                    "sourceVolume": "db-data",
-                    "containerPath": "/var/lib/postgresql/data"
-                }
-            ]
-        }
-    ]
-}
diff --git a/mattermost/LICENSE b/mattermost/LICENSE
deleted file mode 100644
index d9a10c0d..00000000
--- a/mattermost/LICENSE
+++ /dev/null
@@ -1,176 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
diff --git a/mattermost/README.aws.md b/mattermost/README.aws.md
deleted file mode 100644
index 2a0a8678..00000000
--- a/mattermost/README.aws.md
+++ /dev/null
@@ -1,13 +0,0 @@
-## Installation on AWS Elastic Beanstalk
-
-### Requirement
-
-* [The EB CLI](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html)
-
-### Install
-
-```
-eb init
-eb create prod
-eb open prod
-```
diff --git a/mattermost/README.md b/mattermost/README.md
deleted file mode 100644
index aabbb247..00000000
--- a/mattermost/README.md
+++ /dev/null
@@ -1,122 +0,0 @@
-Dockerfiles for Mattermost in production
-
-See [README.aws.md](./README.aws.md) if you want to install it on AWS Elastic Beanstalk.
-
-[![Build Status](https://travis-ci.org/mattermost/mattermost-docker.svg?branch=master)](https://travis-ci.org/mattermost/mattermost-docker)
-
-## Requirements
-
-* [docker]
-* [docker-compose]
-
-## Installation
-
-### Install with SSL certificate
-
-1. Open docker-compose.yml and set `MATTERMOST_ENABLE_SSL` to true.
-
-    ```
-    environment:
-      - MATTERMOST_ENABLE_SSL=true
-    ```
-
-2. Put your SSL certificate as `./volumes/web/cert/cert.pem` and the private key that has
-   no password as `./volumes/web/cert/key-no-password.pem`. If you don't have
-   them you may generate a self-signed SSL certificate.
-
-3. Build and run mattermost
-
-    docker-compose up -d
-
-4. Open `https://your.domain` with your web browser.
-
-### Install without SSL certificate
-
-1. Open docker-compose.yml and set `MATTERMOST_ENABLE_SSL` to false.
-
-    ```
-    environment:
-      - MATTERMOST_ENABLE_SSL=false
-    ```
-    
-2. Build and run mattermost
-
-    docker-compose up -d
-
-3. Open `http://your.domain` with your web browser.
-
-## Starting/Stopping
-
-### Start
-
-    docker-compose start
-
-### Stop
-
-    docker-compose stop
-
-## Removing
-
-### Remove the containers
-
-    docker-compose stop && docker-compose rm
-
-### Remove the data and settings of your mattermost instance
-
-    sudo rm -rf volumes
-
-## Database Backup
-
-When AWS S3 environment variables are specified on db docker container, it enables [Wal-E](https://github.com/wal-e/wal-e) backup to S3.
-
-```bash
-docker run -d --name mattermost-db \
-    -e AWS_ACCESS_KEY_ID=XXXX \
-    -e AWS_SECRET_ACCESS_KEY=XXXX \
-    -e WALE_S3_PREFIX=s3://BUCKET_NAME/PATH \
-    -e AWS_REGION=us-east-1
-    -v ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
-    -v /etc/localtime:/etc/localtime:ro
-    db
-```
-
-All four environment variables are required. It will enable completed WAL segments sent to archive storage (S3). The base backup and clean up can be done through the following command:
-
-```bash
-# base backup
-docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /var/lib/postgresql/data"
-# keep the most recent 7 base backups and remove the old ones
-docker exec mattermost-db su - postgres sh -c "/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e delete --confirm retain 7"
-```
-Those tasks can be executed through a cron job or systemd timer.
-
-## Upgrading to Team Edition 3.0.x from 2.x
-
-You need to migrate your database before upgrading mattermost to 3.0.x from
-2.x. Run these commands in the latest mattermost-docker directory.
-
-    docker-compose rm -f app
-    docker-compose build app
-    docker-compose run app -upgrade_db_30
-    docker-compose up -d
-
-See the [offical Upgrade Guide](http://docs.mattermost.com/administration/upgrade.html) for more details.
-
-## Known Issues
-
-* Do not modify the Listen Address in Service Settings.
-* Rarely 'app' container fails to start because of "connection refused" to
-  database. Workaround: Restart the container.
-
-## More informations
-
-If you want to know how to use docker-compose, see [the overview
-page](https://docs.docker.com/compose).
-
-If you want to run Mattermost on Kubernetes you can start with the [manifest examples in the kubernetes folder](contrib/kubernetes/README.md)
-
-For the server configurations, see [prod-ubuntu.rst] of mattermost.
-
-[docker]: http://docs.docker.com/engine/installation/
-[docker-compose]: https://docs.docker.com/compose/install/
-[prod-ubuntu.rst]: https://github.com/mattermost/docs/blob/master/source/install/prod-ubuntu.rst
diff --git a/mattermost/app/Dockerfile b/mattermost/app/Dockerfile
deleted file mode 100644
index 3732032c..00000000
--- a/mattermost/app/Dockerfile
+++ /dev/null
@@ -1,15 +0,0 @@
-FROM ubuntu:14.04
-
-RUN apt-get update && apt-get -y install curl netcat
-RUN mkdir -p /mattermost/data
-
-RUN curl https://releases.mattermost.com/3.6.1/mattermost-team-3.6.1-linux-amd64.tar.gz | tar -xvz
-
-RUN rm /mattermost/config/config.json
-COPY config.template.json /
-
-COPY docker-entry.sh /
-RUN chmod +x /docker-entry.sh
-ENTRYPOINT ["/docker-entry.sh"]
-
-EXPOSE 80
diff --git a/mattermost/app/config.template.json b/mattermost/app/config.template.json
deleted file mode 100644
index 70af3ec1..00000000
--- a/mattermost/app/config.template.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
-    "ServiceSettings": {
-        "ListenAddress": ":80",
-        "MaximumLoginAttempts": 10,
-        "SegmentDeveloperKey": "",
-        "GoogleDeveloperKey": "",
-        "EnableOAuthServiceProvider": false,
-        "EnableIncomingWebhooks": false,
-        "EnableOutgoingWebhooks": false,
-        "EnablePostUsernameOverride": false,
-        "EnablePostIconOverride": false,
-        "EnableTesting": false,
-        "EnableSecurityFixAlert": true
-    },
-    "TeamSettings": {
-        "SiteName": "Mattermost",
-        "MaxUsersPerTeam": 50,
-        "EnableTeamCreation": true,
-        "EnableUserCreation": true,
-        "RestrictCreationToDomains": "",
-        "RestrictTeamNames": true,
-        "EnableTeamListing": false
-    },
-    "SqlSettings": {
-        "DriverName": "postgres",
-        "DataSource": "postgres://MM_USERNAME:MM_PASSWORD@DB_HOST:DB_PORT/MM_DBNAME?sslmode=disable&connect_timeout=10",
-        "DataSourceReplicas": [],
-        "MaxIdleConns": 10,
-        "MaxOpenConns": 10,
-        "Trace": false,
-        "AtRestEncryptKey": "7rAh6iwQCkV4cA1Gsg3fgGOXJAQ43QVg"
-    },
-    "LogSettings": {
-        "EnableConsole": false,
-        "ConsoleLevel": "INFO",
-        "EnableFile": true,
-        "FileLevel": "INFO",
-        "FileFormat": "",
-        "FileLocation": ""
-    },
-    "FileSettings": {
-        "DriverName": "local",
-        "Directory": "/mattermost/data/",
-        "EnablePublicLink": true,
-        "PublicLinkSalt": "A705AklYF8MFDOfcwh3I488G8vtLlVip",
-        "ThumbnailWidth": 120,
-        "ThumbnailHeight": 100,
-        "PreviewWidth": 1024,
-        "PreviewHeight": 0,
-        "ProfileWidth": 128,
-        "ProfileHeight": 128,
-        "InitialFont": "luximbi.ttf",
-        "AmazonS3AccessKeyId": "",
-        "AmazonS3SecretAccessKey": "",
-        "AmazonS3Bucket": "",
-        "AmazonS3Region": ""
-    },
-    "EmailSettings": {
-        "EnableSignUpWithEmail": true,
-        "SendEmailNotifications": false,
-        "RequireEmailVerification": false,
-        "FeedbackName": "",
-        "FeedbackEmail": "",
-        "SMTPUsername": "",
-        "SMTPPassword": "",
-        "SMTPServer": "",
-        "SMTPPort": "",
-        "ConnectionSecurity": "",
-        "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS",
-        "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL",
-        "ApplePushServer": "",
-        "ApplePushCertPublic": "",
-        "ApplePushCertPrivate": ""
-    },
-    "RateLimitSettings": {
-        "EnableRateLimiter": true,
-        "PerSec": 10,
-        "MemoryStoreSize": 10000,
-        "VaryByRemoteAddr": true,
-        "VaryByHeader": ""
-    },
-    "PrivacySettings": {
-        "ShowEmailAddress": true,
-        "ShowFullName": true
-    },
-    "GitLabSettings": {
-        "Enable": false,
-        "Secret": "",
-        "Id": "",
-        "Scope": "",
-        "AuthEndpoint": "",
-        "TokenEndpoint": "",
-        "UserApiEndpoint": ""
-    }
-}
diff --git a/mattermost/app/docker-entry.sh b/mattermost/app/docker-entry.sh
deleted file mode 100644
index 27efe2e4..00000000
--- a/mattermost/app/docker-entry.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-config=/mattermost/config/config.json
-DB_HOST=${DB_HOST:-db}
-DB_PORT_5432_TCP_PORT=${DB_PORT_5432_TCP_PORT:-5432}
-MM_USERNAME=${MM_USERNAME:-mmuser}
-MM_PASSWORD=${MM_PASSWORD:-mmuser_password}
-MM_DBNAME=${MM_DBNAME:-mattermost}
-echo -ne "Configure database connection..."
-if [ ! -f $config ]
-then
-    cp /config.template.json $config
-    sed -Ei "s/DB_HOST/$DB_HOST/" $config
-    sed -Ei "s/DB_PORT/$DB_PORT_5432_TCP_PORT/" $config
-    sed -Ei "s/MM_USERNAME/$MM_USERNAME/" $config
-    sed -Ei "s/MM_PASSWORD/$MM_PASSWORD/" $config
-    sed -Ei "s/MM_DBNAME/$MM_DBNAME/" $config
-    echo OK
-else
-    echo SKIP
-fi
-
-echo "Wait until database $DB_HOST:$DB_PORT_5432_TCP_PORT is ready..."
-until nc -z $DB_HOST $DB_PORT_5432_TCP_PORT
-do
-    sleep 1
-done
-
-# Wait to avoid "panic: Failed to open sql connection pq: the database system is starting up"
-sleep 1
-
-echo "Starting platform"
-cd /mattermost/bin
-./platform $*
diff --git a/mattermost/contrib/kubernetes/README.md b/mattermost/contrib/kubernetes/README.md
deleted file mode 100644
index ca5a2f98..00000000
--- a/mattermost/contrib/kubernetes/README.md
+++ /dev/null
@@ -1,110 +0,0 @@
-Mattermost on Kubernetes
-=======
-
-You can use these manifests as a starting point to run Mattermost on Kubernetes.
-
-If you already have a Kubernetes cluster you can skip this first step.
-
-### Start local Kubernetes cluster
-
-To get started we can use [minikube](https://github.com/kubernetes/minikube/) to run a local kubernetes cluster.
-
-Download and install minikube and any dependancies for your operating system (see minikube readme). You will also need to install [kubectl](http://kubernetes.io/docs/user-guide/prereqs/).
-
-Start the minikube VM and Kubernetes API server
-
-```
-minikube start
-```
-
-### Start a Postgres database
-
-#### WARNING: The database is not backup up and will lose all data if the pod is restarted. Consider using a [persistent volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) for storing pgdata
-
-This will run a postgres deployment with default values for database name, username, and password.
-
-```
-kubectl run postgres --image=postgres:9 \
-  --env="POSTGRES_PASSWORD=mmuser_password" \
-  --env="POSTGRES_DB=mattermost" \
-  --env="POSTGRES_USER=mmuser"
-```
-Expose the postgres database as a service named "db"
-```
-kubectl expose deployment postgres \
-  --name=db \
-  --port 5432 \
-  --target-port 5432
-```
-
-### Run Mattermost container
-
-The Mattermost application is split into three manifests.
-
-First, create the secret which will set the environment varibles for the main application container. If you changed the values for the Postgres container you will also need to set the values in mattermost.secret.yaml using the [manual steps for creating a secret](http://kubernetes.io/docs/user-guide/secrets/#creating-a-secret-manually).
-```
-kubectl create -f mattermost.secret.yaml
-```
-Next create the Mattermost deployment (main application) with
-```
-kubectl create -f mattermost.deployment.yaml
-```
-You should check that the pod started successfully with 
-```
-kubectl get po -l app=mattermost
-NAME                              READY     STATUS    RESTARTS   AGE
-mattermost-app-1605216003-fvnz1   1/1       Running   0          44m
-```
-
-Finally, you can expose the application with a service so you can easily access the application from a web browser. The example service is using a `type: NodePort` which means it will be exposed on a random high port on your cluster nodes (or minikube VM if you're using minikube). If you are running your Kubernetes cluster in AWS or GCE you should change the type to loadBalancer.
-```
-kubectl create -f mattermost.svc.yaml
-```
-Now you can get your VM's IP address with 
-```
-minikube ip
-192.168.99.100
-```
-and the exposed port for the application with
-```
-kubectl describe svc mattermost
-Name:                   mattermost
-Namespace:              default
-Labels:                 <none>
-Selector:               app=mattermost,tier=app
-Type:                   NodePort
-IP:                     10.0.0.194
-Port:                   http    80/TCP
-NodePort:               http    32283/TCP
-Endpoints:              172.17.0.4:80
-Session Affinity:       None
-No events.
-```
-Make sure the Endpoints shows an IP address. This should correlate to the pod IP started by the deployment.
-
-Now browse to your node IP and exposed NodePort in your browser to view the application or test it with curl
-
-```
-curl -L http://192.168.99.100:32283
-```
-
-### Optional steps
-
- * If you want your data to be persistent you will need to make persistent volumes for Mattermost and Postgres.
- * If you want to change advanced settings for the mattermost container you can make a [configMap](http://blog.kubernetes.io/2016/04/configuration-management-with-containers.html) for the /mattermost/config/config.json file
- * If you want the application exposed on port 80 you can either specify the port in the service manifest or use an [ingress controller](http://kubernetes.io/docs/user-guide/ingress/#ingress-controllers) and an ingress map for the mattermost service. A sample ingress map would be
-```
----
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: mattermost
-spec:
-  rules:
-  - host: mattermost
-    http:
-      paths:
-      - backend:
-          serviceName: mattermost
-          servicePort: 80
-```
diff --git a/mattermost/contrib/kubernetes/mattermost.deployment.yaml b/mattermost/contrib/kubernetes/mattermost.deployment.yaml
deleted file mode 100644
index 3ecdc5ad..00000000
--- a/mattermost/contrib/kubernetes/mattermost.deployment.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: mattermost-app
-  labels:
-    app: mattermost
-    tier: app
-  namespace: default
-spec:
-  replicas: 1
-  template:
-    metadata:
-      name: mattermost-app
-      labels:
-        app: mattermost
-        tier: app
-    spec:
-      containers:
-      - name: mattermost-app
-        image: "mattermost/mattermost-prod-app:3"
-        env:
-        - name: DB_HOST
-          valueFrom:
-            secretKeyRef:
-              name: mattermost.env
-              key: db-host
-        - name: DB_PORT
-          valueFrom:
-            secretKeyRef:
-              name: mattermost.env
-              key: db-port
-        - name: MM_USERNAME
-          valueFrom:
-            secretKeyRef:
-              name: mattermost.env
-              key: mm-username
-        - name: MM_PASSWORD
-          valueFrom:
-            secretKeyRef:
-              name: mattermost.env
-              key: mm-password
-        - name: MM_DBNAME
-          valueFrom:
-            secretKeyRef:
-              name: mattermost.env
-              key: mm-dbname
-        volumeMounts:
-        # optional persistant storage
-        #- name: appdata
-          #mountPath: /mattermost/data
-        - name: etclocaltime
-          mountPath: /etc/localtime
-          readOnly: true
-      volumes:
-      # optional persistant storage
-      #- name: appdata
-        #persistentVolumeClaim:
-        #  claimName: mattermost-app
-      - name: etclocaltime
-        hostPath:
-          path: /etc/localtime
diff --git a/mattermost/contrib/kubernetes/mattermost.secret.yaml b/mattermost/contrib/kubernetes/mattermost.secret.yaml
deleted file mode 100644
index 595b9c23..00000000
--- a/mattermost/contrib/kubernetes/mattermost.secret.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-kind: Secret
-apiVersion: v1
-metadata:
-  name: mattermost.env
-  namespace: default
-type: Opaque
-data:
-  # see http://kubernetes.io/docs/user-guide/secrets/#creating-a-secret-using-kubectl-create-secret
-  # for creating secrets manually
-    # db
-  db-host: ZGI=
-    # 5432
-  db-port: NTQzMg==
-    # mmuser
-  mm-username: bW11c2Vy
-    # mmuser_password
-  mm-password: bW11c2VyX3Bhc3N3b3Jk
-    # mattermost
-  mm-dbname: bWF0dGVybW9zdA==
diff --git a/mattermost/contrib/kubernetes/mattermost.svc.yaml b/mattermost/contrib/kubernetes/mattermost.svc.yaml
deleted file mode 100644
index b5e3fdcb..00000000
--- a/mattermost/contrib/kubernetes/mattermost.svc.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: mattermost
-  namespace: default
-spec:
-  type: NodePort
-  ports:
-  - port: 80
-    targetPort: 80
-    protocol: TCP
-    name: http
-  selector:
-    app: mattermost
-    tier: app
diff --git a/mattermost/db/Dockerfile b/mattermost/db/Dockerfile
deleted file mode 100644
index c35098d3..00000000
--- a/mattermost/db/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-FROM postgres:9.4
-
-RUN apt-get update \
-    && apt-get install -y python-dev lzop pv daemontools curl build-essential \
-    && curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python \
-    && pip install 'wal-e<1.0.0' \
-    && apt-get remove -y build-essential python-dev \
-    && apt-get autoremove -y \
-    && apt-get clean \
-    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
-ADD make_db.sh /docker-entrypoint-initdb.d/
-ADD setup-wale.sh /docker-entrypoint-initdb.d/
-COPY docker-entrypoint1.sh /
-RUN chmod +x /docker-entrypoint1.sh
-
-ENTRYPOINT ["/docker-entrypoint1.sh"]
-
-CMD ["postgres"]
diff --git a/mattermost/db/docker-entrypoint1.sh b/mattermost/db/docker-entrypoint1.sh
deleted file mode 100755
index 67d085a0..00000000
--- a/mattermost/db/docker-entrypoint1.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# if wal backup is not enabled, use minimal wal logging to reduce disk space
-: ${WAL_LEVEL:=minimal}
-: ${ARCHIVE_MODE:=off}
-: ${ARCHIVE_TIMEOUT:=60}
-
-export WAL_LEVEL
-export ARCHIVE_MODE
-export ARCHIVE_TIMEOUT
-
-# PGDATA is defined in upstream postgres dockerfile
-
-function update_conf () {
-    if [ -f $PGDATA/postgresql.conf ]; then
-        sed -i "s/wal_level =.*$/wal_level = $WAL_LEVEL/g" $PGDATA/postgresql.conf
-        sed -i "s/archive_mode =.*$/archive_mode = $ARCHIVE_MODE/g" $PGDATA/postgresql.conf
-        sed -i "s/archive_timeout =.*$/archive_timeout = $ARCHIVE_TIMEOUT/g" $PGDATA/postgresql.conf
-    fi
-}
-
-if [ "${1:0:1}" = '-'  ]; then
-    set -- postgres "$@"
-fi
-
-if [ "$1" = 'postgres'  ]; then
-    VARS=(AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY WALE_S3_PREFIX AWS_REGION)
-
-    for v in ${VARS[@]}; do
-        if [ "${!v}" = "" ]; then
-            echo "$v is required for Wal-E but not set. Skipping Wal-E setup."
-            update_conf
-            . /docker-entrypoint.sh
-            exit
-        fi
-    done
-
-    umask u=rwx,g=rx,o=
-    mkdir -p /etc/wal-e.d/env
-
-    for v in ${VARS[@]}; do
-        echo "${!v}" > /etc/wal-e.d/env/$v
-    done
-    chown -R root:postgres /etc/wal-e.d
-
-    WAL_LEVEL=archive
-    ARCHIVE_MODE=on
-
-    update_conf
-    . /docker-entrypoint.sh
-fi
diff --git a/mattermost/db/make_db.sh b/mattermost/db/make_db.sh
deleted file mode 100644
index b1059605..00000000
--- a/mattermost/db/make_db.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-set -e
-
-MM_USERNAME=${MM_USERNAME:-mmuser}
-MM_PASSWORD=${MM_PASSWORD:-mmuser_password}
-MM_DBNAME=${MM_DBNAME:-mattermost}
-
-psql -v ON_ERROR_STOP=1 --username "postgres" <<- EOSQL
-    CREATE DATABASE $MM_DBNAME;
-    CREATE USER $MM_USERNAME WITH PASSWORD '$MM_PASSWORD';
-    GRANT ALL PRIVILEGES ON DATABASE $MM_DBNAME to $MM_USERNAME;
-EOSQL
diff --git a/mattermost/db/setup-wale.sh b/mattermost/db/setup-wale.sh
deleted file mode 100644
index 7f2584f9..00000000
--- a/mattermost/db/setup-wale.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-# wal-e specific
-echo "wal_level = $WAL_LEVEL" >> $PGDATA/postgresql.conf
-echo "archive_mode = $ARCHIVE_MODE" >> $PGDATA/postgresql.conf
-echo "archive_command = 'envdir /etc/wal-e.d/env /usr/local/bin/wal-e wal-push %p'" >> $PGDATA/postgresql.conf
-echo "archive_timeout = $ARCHIVE_TIMEOUT" >> $PGDATA/postgresql.conf
-
-# no cron in the image, use systemd timer on host instead
-#su - postgres -c "crontab -l | { cat; echo \"0 3 * * * /usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /var/lib/postgresql/data\"; } | crontab -"
-#su - postgres -c "crontab -l | { cat; echo \"0 4 * * * /usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e delete --confirm retain 7\"; } | crontab -"
diff --git a/mattermost/docker-compose-v1.yml b/mattermost/docker-compose-v1.yml
deleted file mode 100644
index e01768a6..00000000
--- a/mattermost/docker-compose-v1.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-db:
-  build: db
-  restart: always
-  volumes:
-    - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
-    - /etc/localtime:/etc/localtime:ro
-  # uncomment the following to enable backup
-  environment:
-    - MM_USERNAME=mmuser
-    - MM_PASSWORD=mmuser_password
-    - MM_DBNAME=mattermost
-  #  - AWS_ACCESS_KEY_ID=XXXX
-  #  - AWS_SECRET_ACCESS_KEY=XXXX
-  #  - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
-  #  - AWS_REGION=us-east-1
-app:
-  build: app
-  links:
-    - db:db
-  restart: always
-  volumes:
-    - ./volumes/app/mattermost/config:/mattermost/config:rw
-    - ./volumes/app/mattermost/data:/mattermost/data:rw
-    - /etc/localtime:/etc/localtime:ro
-web:
-  build: web
-  ports:
-    - "80:80"
-    - "443:443"
-  links:
-    - app:app
-  restart: always
-  volumes:
-      # This directory must have cert files
-    - ./volumes/web/cert:/cert:ro
-    - /etc/localtime:/etc/localtime:ro
-  environment:
-    - MATTERMOST_ENABLE_SSL=false
-    - PLATFORM_PORT_80_TCP_PORT=80
diff --git a/mattermost/docker-compose.yml b/mattermost/docker-compose.yml
deleted file mode 100644
index 6751bd79..00000000
--- a/mattermost/docker-compose.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-version: "2"
-
-services:
-
-  db:
-    build: db
-    restart: always
-    volumes:
-      - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
-      - /etc/localtime:/etc/localtime:ro
-    # uncomment the following to enable backup
-    environment:
-      - MM_USERNAME=mmuser
-      - MM_PASSWORD=mmuser_password
-      - MM_DBNAME=mattermost
-    #  - AWS_ACCESS_KEY_ID=XXXX
-    #  - AWS_SECRET_ACCESS_KEY=XXXX
-    #  - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
-    #  - AWS_REGION=us-east-1
-
-  app:
-    build: app
-    restart: always
-    volumes:
-      - ./volumes/app/mattermost/config:/mattermost/config:rw
-      - ./volumes/app/mattermost/data:/mattermost/data:rw
-      - /etc/localtime:/etc/localtime:ro
-
-  web:
-    build: web
-    ports:
-      - "80:80"
-      - "443:443"
-    restart: always
-    volumes:
-      # This directory must have cert files
-      - ./volumes/web/cert:/cert:ro
-      - /etc/localtime:/etc/localtime:ro
-    environment:
-      - MATTERMOST_ENABLE_SSL=false
-      - PLATFORM_PORT_80_TCP_PORT=80
diff --git a/mattermost/web/Dockerfile b/mattermost/web/Dockerfile
deleted file mode 100644
index af26369a..00000000
--- a/mattermost/web/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-FROM ubuntu:14.04
-
-RUN apt-get update && apt-get install -y nginx
-
-RUN rm /etc/nginx/sites-enabled/default
-
-COPY mattermost /etc/nginx/sites-available/
-COPY mattermost-ssl /etc/nginx/sites-available/
-ADD docker-entry.sh /
-
-RUN chmod +x /docker-entry.sh
-
-# You can see the logs using `docker-compose logs web`.
-RUN ln -sf /dev/stdout /var/log/nginx/access.log
-RUN ln -sf /dev/stderr /var/log/nginx/error.log
-
-# Define working directory.
-WORKDIR /etc/nginx
-
-ENTRYPOINT /docker-entry.sh
-
-EXPOSE 80 443
diff --git a/mattermost/web/docker-entry.sh b/mattermost/web/docker-entry.sh
deleted file mode 100644
index 4f90a5b4..00000000
--- a/mattermost/web/docker-entry.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-echo Starting Nginx
-sed -Ei "s/APP_PORT/$PLATFORM_PORT_80_TCP_PORT/" /etc/nginx/sites-available/mattermost
-sed -Ei "s/APP_PORT/$PLATFORM_PORT_80_TCP_PORT/" /etc/nginx/sites-available/mattermost-ssl
-if [ "$MATTERMOST_ENABLE_SSL" = true ]; then
-    ssl="-ssl"
-fi
-ln -s /etc/nginx/sites-available/mattermost$ssl /etc/nginx/sites-enabled/mattermost
-nginx -g 'daemon off;'
diff --git a/mattermost/web/mattermost b/mattermost/web/mattermost
deleted file mode 100644
index 69a64ec5..00000000
--- a/mattermost/web/mattermost
+++ /dev/null
@@ -1,22 +0,0 @@
-map $http_x_forwarded_proto $proxy_x_forwarded_proto {
-  default $http_x_forwarded_proto;
-  ''      $scheme;
-}
-
-server {
-    listen 80;
-
-    location / {
-        gzip off;
-
-        client_max_body_size 50M;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection "upgrade";
-        proxy_set_header Host $http_host;
-        proxy_set_header X-Real-IP $remote_addr;
-        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
-        proxy_set_header X-Frame-Options SAMEORIGIN;
-        proxy_pass http://app:APP_PORT;
-    }
-}
diff --git a/mattermost/web/mattermost-ssl b/mattermost/web/mattermost-ssl
deleted file mode 100644
index ac28a9b5..00000000
--- a/mattermost/web/mattermost-ssl
+++ /dev/null
@@ -1,39 +0,0 @@
-# server {
-#     listen         80;
-#     server_name    mattermost.example.com;
-#     return         301 https://$server_name$request_uri;
-# }
-
-map $http_x_forwarded_proto $proxy_x_forwarded_proto {
-  default $http_x_forwarded_proto;
-  ''      $scheme;
-}
-
-server {
-    listen 443;
-
-    ssl on;
-    ssl_certificate /cert/cert.pem;
-    ssl_certificate_key /cert/key-no-password.pem;
-    ssl_session_timeout 5m;
-    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
-    ssl_ciphers HIGH:MEDIUM:!SSLv2:!PSK:!SRP:!ADH:!AECDH;
-    ssl_prefer_server_ciphers on;
-
-    location / {
-        gzip off;
-        proxy_set_header X-Forwarded-Ssl on;
-
-        client_max_body_size 50M;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection "upgrade";
-        proxy_set_header Host $http_host;
-        proxy_set_header X-Real-IP $remote_addr;
-        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
-        proxy_set_header X-Frame-Options SAMEORIGIN;
-        proxy_pass http://app:APP_PORT;
-    }
-}
-
-# See https://github.com/mattermost/docs/blob/master/source/install/prod-ubuntu.rst for the SSL configuration
-- 
GitLab