From cc91a15379382f635324daf788e88d4448501229 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Fri, 21 May 2021 10:04:27 +0200 Subject: [PATCH] Drop comment and add lines --- entrypoint.sh.tmpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index c7650eb..06f27b0 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -3,8 +3,6 @@ set -eu file_env() { - # https://medium.com/@adrian.gheorghe.dev/using-docker-secrets-in-your-environment-variables-7a0609659aab - local var="$1" local fileVar="${var}_FILE" local def="${2:-}" @@ -15,6 +13,7 @@ file_env() { fi local val="$def" + if [ "${!var:-}" ]; then val="${!var}" elif [ "${!fileVar:-}" ]; then