From 6ec897971c04581928aa2c1395b4ba496ff1dd58 Mon Sep 17 00:00:00 2001 From: Marco Kundt Date: Mon, 12 Apr 2021 15:02:03 +0200 Subject: [PATCH] add variable for the restart policy --- docker-compose.yml | 6 +++--- env.example | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 593ff6e..bc65742 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: postgres: container_name: postgres_mattermost image: postgres:${POSTGRES_IMAGE_TAG} - restart: unless-stopped + restart: ${RESTART_POLICY} volumes: - ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data environment: @@ -21,7 +21,7 @@ services: nginx: container_name: nginx_mattermost image: nginx:${NGINX_IMAGE_TAG} - restart: unless-stopped + restart: ${RESTART_POLICY} volumes: - ${NGINX_MATTERMOST_CONFIG}:/etc/nginx/conf.d/mattermost.conf:ro - ${NGINX_DHPARAMS_FILE}:/dhparams4096.pem @@ -40,7 +40,7 @@ services: - nginx container_name: mattermost image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG} - restart: unless-stopped + restart: ${RESTART_POLICY} volumes: - ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw - ${MATTERMOST_DATA_PATH}:/mattermost/data:rw diff --git a/env.example b/env.example index 6580776..58dc6f9 100644 --- a/env.example +++ b/env.example @@ -3,6 +3,7 @@ ## A list of these tz database names can be looked up at Wikipedia ## https://en.wikipedia.org/wiki/List_of_tz_database_time_zones TZ=UTC +RESTART_POLICY=unless-stopped # Postrges settings ## Documentation for this image and available settings can be found on hub.docker.com