From c99085c396bcd4b3754ab99d5380862ec5fdb8d6 Mon Sep 17 00:00:00 2001 From: Slava <20563034+veaceslavdoina@users.noreply.github.com> Date: Wed, 21 Feb 2024 22:50:57 +0200 Subject: [PATCH] Set environment variables from files in Docker (#717) Signed-off-by: Slava <20563034+veaceslavdoina@users.noreply.github.com> --- docker/docker-entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index a67340a7c..f315ddb71 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,5 +1,10 @@ #!/bin/bash +# Environment variables from files +if [[ -n "${ENV_PATH}" ]]; then + [[ -f ${ENV_PATH} ]] && source ${ENV_PATH} || for f in ${ENV_PATH}/*; do source $f; done +fi + # Parameters if [[ -z "${CODEX_NAT}" ]]; then if [[ "${NAT_IP_AUTO}" == "true" && -z "${NAT_PUBLIC_IP_AUTO}" ]]; then