From 82f13b1e4ced23eae1f252624c33b9eee35d07ad Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Mon, 13 Mar 2017 15:26:45 -0700 Subject: [PATCH] Move enterprise version into this branch (#94) Since the only difference is mattermost package and we don't want to maintain two difference branches, just moved the enterprise version into a alternative dockerfile --- .gitignore | 8 ++++++++ README.md | 21 ++++++++++++++++++--- app/Dockerfile-enterprise | 24 ++++++++++++++++++++++++ docker-compose-v1.yml | 7 +++++-- docker-compose.yml | 7 +++++-- 5 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 .gitignore create mode 100644 app/Dockerfile-enterprise diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5bed12f --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ + +# Elastic Beanstalk Files +.elasticbeanstalk/* +!.elasticbeanstalk/*.cfg.yml +!.elasticbeanstalk/*.global.yml + +# Generated data +volumes diff --git a/README.md b/README.md index 9f5ffb7..441626c 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ This project enables deployment of a Mattermost server in a multi-node productio [![Build Status](https://travis-ci.org/mattermost/mattermost-docker.svg?branch=master)](https://travis-ci.org/mattermost/mattermost-docker) Notes: +- The default Mattermost edition for this repo has changed from team edition to enterprise edition. Please see [Choose Edition](#choose-edition-to-install) section. - To install this Docker project on AWS Elastic Beanstalk please see [AWS Elastic Beanstalk Guide](./README.aws.md). - To install Mattermost without Docker directly onto a Linux-based operating systems, please see [Admin Guide](https://docs.mattermost.com/guides/administrator.html#installing-mattermost). @@ -17,6 +18,16 @@ The following instructions deploy Mattermost in a production configuration using * [docker] * [docker-compose] +### Choose Edition to Install + +If you want to install enterprise edition, you can skip this section. + +To install the team edition, comment out the following line in docker-compose.yaml file: + + ``` + dockerfile: Dockerfile-enterprise + ``` + ### Database Make sure to set the appropriate values for `MM_USERNAME`, `MM_PASSWORD` and `MM_DBNAME`. @@ -27,19 +38,23 @@ Make sure to set the appropriate values for `MM_USERNAME`, `MM_PASSWORD` and `MM 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 +2. Build and run mattermost + ``` docker-compose up -d + ``` -4. Open `https://your.domain` with your web browser. +3. Open `https://your.domain` with your web browser. ### Install without SSL certificate 1. Build and run mattermost + ``` docker-compose up -d + ``` -3. Open `http://your.domain` with your web browser. +2. Open `http://your.domain` with your web browser. ## Starting/Stopping diff --git a/app/Dockerfile-enterprise b/app/Dockerfile-enterprise new file mode 100644 index 0000000..3b35e55 --- /dev/null +++ b/app/Dockerfile-enterprise @@ -0,0 +1,24 @@ +FROM ubuntu:14.04 + +ENV PATH="/mattermost/bin:${PATH}" + +RUN apt-get update && apt-get -y install curl netcat +RUN mkdir -p /mattermost/data + +ENV MM_VERSION=3.6.2 + +RUN curl https://releases.mattermost.com/$MM_VERSION/mattermost-$MM_VERSION-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 + +VOLUME /mattermost/data + +WORKDIR /mattermost/bin +CMD ["platform"] diff --git a/docker-compose-v1.yml b/docker-compose-v1.yml index bb2525b..4f45cee 100644 --- a/docker-compose-v1.yml +++ b/docker-compose-v1.yml @@ -4,11 +4,11 @@ db: volumes: - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data - /etc/localtime:/etc/localtime:ro - # uncomment the following to enable backup environment: - POSTGRES_USER=mmuser - POSTGRES_PASSWORD=mmuser_password - POSTGRES_DB=mattermost + # uncomment the following to enable backup # - AWS_ACCESS_KEY_ID=XXXX # - AWS_SECRET_ACCESS_KEY=XXXX # - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH @@ -16,7 +16,10 @@ db: # in case your config is not in default location # - MM_CONFIG=/mattermost/config/config.jso app: - build: app + build: + context: app + # comment out for team version + dockerfile: Dockerfile-enterprise links: - db:db restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index 4a03ac5..5d1622c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,11 +8,11 @@ services: volumes: - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data - /etc/localtime:/etc/localtime:ro - # uncomment the following to enable backup environment: - POSTGRES_USER=mmuser - POSTGRES_PASSWORD=mmuser_password - POSTGRES_DB=mattermost + # uncomment the following to enable backup # - AWS_ACCESS_KEY_ID=XXXX # - AWS_SECRET_ACCESS_KEY=XXXX # - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH @@ -21,7 +21,10 @@ services: # - MM_CONFIG=/mattermost/config/config.jso app: - build: app + build: + context: app + # comment out for team edition + dockerfile: Dockerfile-enterprise restart: unless-stopped volumes: - ./volumes/app/mattermost/config:/mattermost/config:rw