Skip to content

Commit

Permalink
last reading of environment variables should be from entrypoint.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
  • Loading branch information
bigcat88 committed Oct 10, 2024
1 parent 954a034 commit d24fbcb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ex_app_scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions ex_app_scripts/init_pgsql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions ex_app_scripts/set_workers_num.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d24fbcb

Please sign in to comment.