From 8ca68aadc91428531dabb8ccbaeaf7041c013dd6 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 23 Oct 2020 10:38:55 +0200 Subject: [PATCH] fix: [apache] convert config store directory to host path also. Signed-off-by: Valentin Lab --- apache/lib/common | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apache/lib/common b/apache/lib/common index 3cd4bcd..398061b 100644 --- a/apache/lib/common +++ b/apache/lib/common @@ -431,12 +431,23 @@ apache_code_dir() { host_path=$(e "$cfg" | cfg-get-value location 2>/dev/null) || host_path="$DATASTORE/$BASE_SERVICE_NAME${local_path}" + + ## convert to docker host path + case "$host_path" in + "$DATASTORE"*) + docker_host_path="$HOST_DATASTORE${host_path##$DATASTORE}" + ;; + "$CONFIGSTORE"*) + docker_host_path="$HOST_CONFIGSTORE${host_path##$CONFIGSTORE}" + ;; + esac + mkdir -p "$host_path" || return 1 init-config-add " $SERVICE_NAME: volumes: - - \"$HOST_DATASTORE${host_path##$DATASTORE}:$local_path\" + - \"${docker_host_path}:$local_path\" " }