-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Automatic Merge
- Loading branch information
1 parent
6facf06
commit eb06219
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. | ||
# See License.txt for license information. | ||
FROM postgres:12 | ||
|
||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 | ||
RUN apt-get update && apt-get install -y ca-certificates | ||
|
||
ARG MATTERMOST_VERSION | ||
# | ||
# Configure PostgreSQL | ||
# | ||
|
||
ENV POSTGRES_USER=mmuser | ||
ENV POSTGRES_PASSWORD=mostest | ||
ENV POSTGRES_DB=mattermost_test | ||
|
||
# | ||
# Configure Mattermost | ||
# | ||
WORKDIR /mm | ||
|
||
# Copy over files | ||
ADD https://releases.mattermost.com/${MATTERMOST_VERSION}/mattermost-team-${MATTERMOST_VERSION}-linux-amd64.tar.gz . | ||
RUN tar -zxvf mattermost-team-${MATTERMOST_VERSION}-linux-amd64.tar.gz | ||
ADD config_docker.json ./mattermost/config/config_docker.json | ||
ADD docker-entry.sh . | ||
|
||
RUN chmod +x ./docker-entry.sh | ||
ENTRYPOINT ./docker-entry.sh | ||
|
||
# Mattermost environment variables | ||
ENV PATH="/mm/mattermost/bin:${PATH}" | ||
|
||
# Create default storage directory | ||
RUN mkdir ./mattermost-data | ||
VOLUME /mm/mattermost-data | ||
|
||
# Ports | ||
EXPOSE 8065 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Mattermost Docker Preview Image | ||
|
||
This is a Docker image to install Mattermost in *Preview Mode* for exploring product functionality on a single machine using Docker. | ||
|
||
Note: This configuration should not be used in production, as it’s using a known password string and contains other non-production configuration settings, and it does not support upgrade. If you’re looking for a production installation with Docker, please see the [Mattermost Production Docker Deployment Guide](https://docs.mattermost.com/install/install-docker.html#deploy-mattermost-on-docker-for-production-use). | ||
|
||
To contribute, please see [Contribution Guidelines](https://developers.mattermost.com/contribute/more-info/getting-started/). | ||
|
||
To file issues, [search for existing bugs and file a GitHub issue if your bug is new](https://developers.mattermost.com/contribute/why-contribute/#youve-found-a-bug). | ||
|
||
## Usage | ||
|
||
Please see [documentation for usage](http://docs.mattermost.com/install/docker-local-machine.html). | ||
|
||
If you have Docker already set up, you can run this image in one line: | ||
|
||
``` | ||
docker run --name mattermost-preview -d --publish 8065:8065 --add-host dockerhost:127.0.0.1 mattermost/mattermost-preview | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"ServiceSettings": { | ||
"EnableOAuthServiceProvider": true, | ||
"EnableDeveloper": false, | ||
"EnableGifPicker": true | ||
}, | ||
"SqlSettings": { | ||
"DriverName": "postgres", | ||
"DataSource": "postgres://mmuser:mostest@localhost/mattermost_test?sslmode=disable\u0026connect_timeout=10\u0026binary_parameters=yes", | ||
"AtRestEncryptKey": "" | ||
}, | ||
"FileSettings": { | ||
"DriverName": "local", | ||
"Directory": "/mm/mattermost-data", | ||
"PublicLinkSalt": "" | ||
}, | ||
"EmailSettings": { | ||
"SMTPServer": "", | ||
"SMTPPort": "", | ||
"PushNotificationContents": "generic" | ||
}, | ||
"ElasticsearchSettings": { | ||
"ConnectionUrl": "" | ||
}, | ||
"PluginSettings": { | ||
"EnableUploads": true, | ||
"PluginStates": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. | ||
# See License.txt for license information. | ||
|
||
echo "Starting PostgreSQL" | ||
docker-entrypoint.sh -c 'shared_buffers=256MB' -c 'max_connections=300' & | ||
|
||
until pg_isready -hlocalhost -p 5432 -U "$POSTGRES_USER" &> /dev/null; do | ||
echo "postgres still not ready, sleeping" | ||
sleep 5 | ||
done | ||
|
||
echo "Updating CA certificates" | ||
update-ca-certificates --fresh >/dev/null | ||
|
||
echo "Starting platform" | ||
cd mattermost | ||
exec ./bin/mattermost --config=config/config_docker.json |