From b12721b6a3d0386a0f2cfa7f692da46a380b5cfe Mon Sep 17 00:00:00 2001 From: Marco Kundt Date: Mon, 12 Apr 2021 14:05:15 +0200 Subject: [PATCH] adding variables for image tags --- docker-compose.yml | 6 +++--- env.example | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cb78dce..dd28d86 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3" services: postgres: container_name: postgres_mattermost - image: postgres:alpine + image: postgres:${POSTGRES_IMAGE_TAG} restart: unless-stopped volumes: - ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data @@ -15,7 +15,7 @@ services: nginx: container_name: nginx_mattermost - image: nginx:alpine + image: nginx:${NGINX_IMAGE_TAG} restart: unless-stopped volumes: - ${NGINX_MATTERMOST_CONFIG}:/etc/nginx/conf.d/mattermost.conf:ro @@ -32,7 +32,7 @@ services: - postgres - nginx container_name: mattermost - image: mattermost/mattermost-enterprise-edition:latest + image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG} restart: unless-stopped volumes: - ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw diff --git a/env.example b/env.example index 47c9404..51b1d7c 100644 --- a/env.example +++ b/env.example @@ -1,6 +1,8 @@ # Postrges settings ## Documentation for this image and available settings can be found on hub.docker.com ## https://hub.docker.com/_/postgres +POSTGRES_IMAGE_TAG=alpine + POSTGRES_USER=mmuser POSTGRES_PASSWORD=mmuser_password POSTGRES_DB=mattermost @@ -14,6 +16,8 @@ POSTGRES_DATA_PATH=./data/postgres # relative paths will work but absolute are ## Inside the container the uid and gid is 101. The folder owner can be set with ## `sudo chown -R 101:101 ./data/mattermost`. +NGINX_IMAGE_TAG=alpine + NGINX_MATTERMOST_CONFIG=./nginx/mattermost.conf NGINX_DHPARAMS_FILE=./nginx/dhparams4096.pem @@ -33,6 +37,9 @@ MATTERMOST_LOGS_PATH=./data/mattermost/logs MATTERMOST_PLUGINS_PATH=./data/mattermost/plugins MATTERMOST_CLIENT_PLUGINS_PATH=./data/mattermost/client-plugins +MATTERMOST_IMAGE=mattermost-enterprise-edition +MATTERMOST_IMAGE_TAG=latest + ## Configuration settings for Mattermost. Documentation on the variables and the settings itself can be found at ## https://docs.mattermost.com/administration/config-settings.html ## Keep in mind that variables set here will take precedence over the same setting in config.json. This includes