From fcbf9c8cb66ab95a96946652f042cdf137fb7c78 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Mon, 25 Sep 2023 10:17:06 +0200 Subject: [PATCH] Set default values in docker compose --- .env.tpl | 11 +++++++---- docker-compose.yml | 10 +++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.env.tpl b/.env.tpl index 172f8b6d..1f6731cd 100644 --- a/.env.tpl +++ b/.env.tpl @@ -12,13 +12,15 @@ HOST_GID= HOST_DOCKER_GID= # DEFAULT: nopaque -DOCKER_DEFAULT_NETWORK_NAME=nopaque +# DOCKER_DEFAULT_NETWORK_NAME= # DEFAULT: ./volumes/db/data -DOCKER_DB_SERVICE_DATA_VOLUME_SOURCE_PATH=./volumes/db/data +# NOTE: Use `.` as +# DOCKER_DB_SERVICE_DATA_VOLUME_SOURCE_PATH= # DEFAULT: ./volumes/mq/data -DOCKER_MQ_SERVICE_DATA_VOLUME_SOURCE_PATH=./volumes/mq/data +# NOTE: Use `.` as +# DOCKER_MQ_SERVICE_DATA_VOLUME_SOURCE_PATH= # NOTE: This must be a network share and it must be available on all # Docker Swarm nodes, mounted to the same path with the same @@ -26,4 +28,5 @@ DOCKER_MQ_SERVICE_DATA_VOLUME_SOURCE_PATH=./volumes/mq/data DOCKER_NOPAQUE_SERVICE_DATA_VOLUME_SOURCE_PATH= # DEFAULT: ./volumes/nopaque/logs -DOCKER_NOPAQUE_SERVICE_LOGS_VOLUME_SOURCE_PATH=./volumes/nopaque/logs +# NOTE: Use `.` as +# DOCKER_NOPAQUE_SERVICE_LOGS_VOLUME_SOURCE_PATH=. diff --git a/docker-compose.yml b/docker-compose.yml index 305b4901..65ecb1fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ version: "3.5" networks: default: - name: "${DOCKER_DEFAULT_NETWORK_NAME}" + name: "${DOCKER_DEFAULT_NETWORK_NAME:-nopaque}" services: db: @@ -20,7 +20,7 @@ services: restart: unless-stopped volumes: - type: bind - source: "${DOCKER_DB_SERVICE_DATA_VOLUME_SOURCE_PATH}" + source: "${DOCKER_DB_SERVICE_DATA_VOLUME_SOURCE_PATH:-./volumes/db/data}" target: "/var/lib/postgresql/data" mq: @@ -28,7 +28,7 @@ services: restart: unless-stopped volumes: - type: bind - source: "${DOCKER_MQ_SERVICE_DATA_VOLUME_SOURCE_PATH}" + source: "${DOCKER_MQ_SERVICE_DATA_VOLUME_SOURCE_PATH:-/volumes/mq/data}" target: "/data" nopaque: @@ -46,7 +46,7 @@ services: - NOPAQUE_GID=${HOST_GID} - DOCKER_GID=${HOST_DOCKER_GID} - NOPAQUE_DATA_PATH=${DOCKER_NOPAQUE_SERVICE_DATA_VOLUME_SOURCE_PATH} - - NOPAQUE_DOCKER_NETWORK_NAME=${DOCKER_DEFAULT_NETWORK_NAME} + - NOPAQUE_DOCKER_NETWORK_NAME=${DOCKER_DEFAULT_NETWORK_NAME:-nopaque} - NOPAQUE_LOGS_PATH=/home/nopaque/logs image: nopaque:latest restart: unless-stopped @@ -60,5 +60,5 @@ services: source: "${DOCKER_NOPAQUE_SERVICE_DATA_VOLUME_SOURCE_PATH}" target: "${DOCKER_NOPAQUE_SERVICE_DATA_VOLUME_SOURCE_PATH}" - type: bind - source: "${DOCKER_NOPAQUE_SERVICE_LOGS_VOLUME_SOURCE_PATH}" + source: "${DOCKER_NOPAQUE_SERVICE_LOGS_VOLUME_SOURCE_PATH:-./volumes/nopaque/logs}" target: "/home/nopaque/logs"