Merge app dockerfiles (#146)

* Merge app dockerfiles

* Update readme for choosing team edition
This commit is contained in:
Kyâne Pichou 2017-09-24 22:25:47 +02:00 committed by GitHub
parent 250f9e3185
commit 6ee75f4f6b
3 changed files with 14 additions and 7 deletions

View File

@ -23,10 +23,12 @@ The following instructions deploy Mattermost in a production configuration using
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
To install the team edition, comment out the two following lines in docker-compose.yaml file:
```yaml
args:
- edition=team
```
The `app` Dockerfile will read the `edition` build argument to install Team (`edition = 'team'`) or Entreprise (`edition != team`) edition.
### Database container
This repository offer a Docker image for the Mattermost database. It is a customized PostgreSQL image that you should configure with following environment variables :

View File

@ -4,6 +4,9 @@ FROM ubuntu:14.04
ENV PATH="/mattermost/bin:${PATH}"
ENV MM_VERSION=4.2.0
# Build argument to set Mattermost edition
ARG edition=entreprise
# Install some needed packages
RUN apt-get update \
&& apt-get -y install \
@ -12,9 +15,10 @@ RUN apt-get update \
netcat \
&& rm -rf /var/lib/apt/lists/*
# Prepare Mattermost
# Get Mattermost
RUN mkdir -p /mattermost/data \
&& curl https://releases.mattermost.com/$MM_VERSION/mattermost-team-$MM_VERSION-linux-amd64.tar.gz | tar -xvz \
&& if [ "$edition" = "team" ] ; then curl https://releases.mattermost.com/$MM_VERSION/mattermost-team-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; \
else curl https://releases.mattermost.com/$MM_VERSION/mattermost-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; fi \
&& cp /mattermost/config/config.json /config.json.save \
&& rm -rf /mattermost/config/config.json

View File

@ -21,8 +21,9 @@ services:
app:
build:
context: app
# comment out for team edition
dockerfile: Dockerfile-enterprise
# comment out 2 following lines for team edition
# args:
# - edition=team
restart: unless-stopped
volumes:
- ./volumes/app/mattermost/config:/mattermost/config:rw