Merge app dockerfiles (#146)
* Merge app dockerfiles * Update readme for choosing team edition
This commit is contained in:
parent
250f9e3185
commit
6ee75f4f6b
@ -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 :
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user