From 8fabf17c215b5fa9cad5f5dd133ad6b6866626b2 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 7 Jul 2023 21:13:01 -0500 Subject: [PATCH] Allow REPLACE_ENV_VARIABLE_PREFIX to be an empty string (#2278) --- docs/configuration/interpolating.md | 2 +- scripts/start-setupMounts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration/interpolating.md b/docs/configuration/interpolating.md index 610ef770..fd6647e9 100644 --- a/docs/configuration/interpolating.md +++ b/docs/configuration/interpolating.md @@ -17,7 +17,7 @@ When the environment variable `REPLACE_ENV_IN_PLACE` is set to `true` (the defau Variables that you want to replace need to be declared inside curly brackets and prefixed with a dollar sign, such as `${CFG_YOUR_VARIABLE}`, which is same as many scripting languages. -You can also change `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_", to limit which environment variables are allowed to be used. For example, with "CFG_" as the prefix, the variable `${CFG_DB_HOST}` would be subsituted, but not `${DB_HOST}`. +You can also change `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_", to limit which environment variables are allowed to be used. For example, with "CFG_" as the prefix, the variable `${CFG_DB_HOST}` would be substituted, but not `${DB_HOST}`. The prefix can be set to an empty string to allow for matching any variable name. If you want to use a file's content for value, such as when using secrets mounted as files, declare the placeholder named like normal in the file and declare an environment variable named the same but with the suffix `_FILE`. diff --git a/scripts/start-setupMounts b/scripts/start-setupMounts index d1b83c43..ae3ee1a5 100755 --- a/scripts/start-setupMounts +++ b/scripts/start-setupMounts @@ -6,7 +6,7 @@ : "${SYNC_SKIP_NEWER_IN_DESTINATION:=${PLUGINS_SYNC_UPDATE:-true}}" : "${REPLACE_ENV_DURING_SYNC:=true}" : "${REPLACE_ENV_SUFFIXES:=yml,yaml,txt,cfg,conf,properties,hjson,json,tml,toml}" -: "${REPLACE_ENV_VARIABLE_PREFIX:=${ENV_VARIABLE_PREFIX:-CFG_}}" +: "${REPLACE_ENV_VARIABLE_PREFIX=${ENV_VARIABLE_PREFIX:-CFG_}}" : "${REPLACE_ENV_VARIABLES_EXCLUDES:=}" : "${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}" : "${DEBUG:=false}"