From d24fbcb707649bf28b50dc6f1fa0cdb1bbc59c8b Mon Sep 17 00:00:00 2001 From: Alexander Piskun Date: Thu, 10 Oct 2024 18:12:52 +0300 Subject: [PATCH] last reading of environment variables should be from entrypoint.sh Signed-off-by: Alexander Piskun --- ex_app_scripts/entrypoint.sh | 3 +++ ex_app_scripts/init_pgsql.sh | 3 --- ex_app_scripts/set_workers_num.sh | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ex_app_scripts/entrypoint.sh b/ex_app_scripts/entrypoint.sh index 86a32fe..f0ae227 100644 --- a/ex_app_scripts/entrypoint.sh +++ b/ex_app_scripts/entrypoint.sh @@ -16,6 +16,9 @@ fi /ex_app_scripts/init_pgsql.sh /ex_app_scripts/set_workers_num.sh +# Reloading environment variables to reflect changes if were +. /etc/environment + # Run all arguments after "first" in the background main_command=$1 shift # Remove the first argument, which is "the name of main binary" diff --git a/ex_app_scripts/init_pgsql.sh b/ex_app_scripts/init_pgsql.sh index 2e3e5ba..7a7ac19 100644 --- a/ex_app_scripts/init_pgsql.sh +++ b/ex_app_scripts/init_pgsql.sh @@ -79,9 +79,6 @@ else fi echo "DATABASE_URL was not set. It is now set to: $DATABASE_URL" - - # Reload environment variables - . /etc/environment else echo "DATABASE_URL is already set to: $DATABASE_URL" fi diff --git a/ex_app_scripts/set_workers_num.sh b/ex_app_scripts/set_workers_num.sh index cda24de..4e1703f 100644 --- a/ex_app_scripts/set_workers_num.sh +++ b/ex_app_scripts/set_workers_num.sh @@ -10,9 +10,6 @@ if [ -z "$NUM_WORKERS" ]; then fi echo "NUM_WORKERS was not set. It is now set to: $NUM_WORKERS" - - # Reload environment variables - . /etc/environment else echo "NUM_WORKERS is already set to: $NUM_WORKERS" fi