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
This commit is contained in:
Pan Luo 2017-03-13 15:26:45 -07:00 committed by GitHub
parent 1a967e8bf3
commit 82f13b1e4c
5 changed files with 60 additions and 7 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
# Generated data
volumes

View File

@ -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) [![Build Status](https://travis-ci.org/mattermost/mattermost-docker.svg?branch=master)](https://travis-ci.org/mattermost/mattermost-docker)
Notes: 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 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). - 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]
* [docker-compose] * [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 ### Database
Make sure to set the appropriate values for `MM_USERNAME`, `MM_PASSWORD` and `MM_DBNAME`. 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 no password as `./volumes/web/cert/key-no-password.pem`. If you don't have
them you may generate a self-signed SSL certificate. them you may generate a self-signed SSL certificate.
3. Build and run mattermost 2. Build and run mattermost
```
docker-compose up -d 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 ### Install without SSL certificate
1. Build and run mattermost 1. Build and run mattermost
```
docker-compose up -d docker-compose up -d
```
3. Open `http://your.domain` with your web browser. 2. Open `http://your.domain` with your web browser.
## Starting/Stopping ## Starting/Stopping

24
app/Dockerfile-enterprise Normal file
View File

@ -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"]

View File

@ -4,11 +4,11 @@ db:
volumes: volumes:
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
# uncomment the following to enable backup
environment: environment:
- POSTGRES_USER=mmuser - POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password - POSTGRES_PASSWORD=mmuser_password
- POSTGRES_DB=mattermost - POSTGRES_DB=mattermost
# uncomment the following to enable backup
# - AWS_ACCESS_KEY_ID=XXXX # - AWS_ACCESS_KEY_ID=XXXX
# - AWS_SECRET_ACCESS_KEY=XXXX # - AWS_SECRET_ACCESS_KEY=XXXX
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH # - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
@ -16,7 +16,10 @@ db:
# in case your config is not in default location # in case your config is not in default location
# - MM_CONFIG=/mattermost/config/config.jso # - MM_CONFIG=/mattermost/config/config.jso
app: app:
build: app build:
context: app
# comment out for team version
dockerfile: Dockerfile-enterprise
links: links:
- db:db - db:db
restart: unless-stopped restart: unless-stopped

View File

@ -8,11 +8,11 @@ services:
volumes: volumes:
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
# uncomment the following to enable backup
environment: environment:
- POSTGRES_USER=mmuser - POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password - POSTGRES_PASSWORD=mmuser_password
- POSTGRES_DB=mattermost - POSTGRES_DB=mattermost
# uncomment the following to enable backup
# - AWS_ACCESS_KEY_ID=XXXX # - AWS_ACCESS_KEY_ID=XXXX
# - AWS_SECRET_ACCESS_KEY=XXXX # - AWS_SECRET_ACCESS_KEY=XXXX
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH # - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
@ -21,7 +21,10 @@ services:
# - MM_CONFIG=/mattermost/config/config.jso # - MM_CONFIG=/mattermost/config/config.jso
app: app:
build: app build:
context: app
# comment out for team edition
dockerfile: Dockerfile-enterprise
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./volumes/app/mattermost/config:/mattermost/config:rw - ./volumes/app/mattermost/config:/mattermost/config:rw