From 52520bc461ed373056097822df63fcc87a887fbf Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Tue, 26 Nov 2024 12:32:19 -0800 Subject: [PATCH] pass env --- arch/tools/cli/core.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/tools/cli/core.py b/arch/tools/cli/core.py index ddb5e9bb..361c2649 100644 --- a/arch/tools/cli/core.py +++ b/arch/tools/cli/core.py @@ -18,10 +18,8 @@ from dotenv import dotenv_values log = getLogger(__name__) -dot_env = dotenv_values(".env") - -def start_archgw_docker(client, arch_config_file): +def start_archgw_docker(client, arch_config_file, env): logs_path = "~/archgw_logs" logs_path_abs = os.path.expanduser(logs_path) @@ -46,7 +44,7 @@ def start_archgw_docker(client, arch_config_file): }, environment={ "OTEL_TRACING_HTTP_ENDPOINT": "http://host.docker.internal:4318/v1/traces", - **dot_env, + **env, }, extra_hosts={"host.docker.internal": "host-gateway"}, healthcheck={ @@ -132,7 +130,7 @@ def start_arch(arch_config_file, env, log_timeout=120): try: client = docker.from_env() - container = start_archgw_docker(client, arch_config_file) + container = start_archgw_docker(client, arch_config_file, env) start_time = time.time()