Skip to content

Commit 2148566

Browse files
authored
Merge pull request #19 from rapyuta-robotics/fix/local-env-host
fix(config): fixes local env api host
2 parents ec46bd7 + 2f746a3 commit 2148566

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rapyuta_io_sdk_v2/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,14 @@ def set_environment(self, name: str = None) -> None:
130130
name = name or "ga" # Default to prod.
131131

132132
if name == "local":
133+
# Allow overriding the local API host via environment variables.
134+
# Priority: LOCAL_V2API_HOST > default fallback.
135+
override_host = (
136+
os.getenv("LOCAL_V2API_HOST")
137+
or "http://gateway/io"
138+
)
133139
self.hosts["environment"] = name
134-
self.hosts["v2api_host"] = "http://v2-apiserver:8080"
140+
self.hosts["v2api_host"] = override_host
135141
return
136142

137143
if name == "ga":

0 commit comments

Comments
 (0)