Skip to content

Commit 97b478e

Browse files
committed
fix: host binding for self-registration
Signed-off-by: Matous Havlena <[email protected]>
1 parent 916194d commit 97b478e

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

src/github_issue_creator/server.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@
1313

1414
BeeAIInstrumentor().instrument()
1515

16+
1617
async def get_root_agent():
1718
return get_build_mock() if os.getenv("IS_BUILD_PASS") == "true" else await get_agent_manager()
1819

20+
1921
async def run():
2022
root_agent = await get_root_agent()
2123

22-
server = BeeAIPlatformServer(config={"configure_telemetry": True, "port": 8000,"host": "0.0.0.0"})
24+
server = BeeAIPlatformServer(
25+
config={
26+
"configure_telemetry": True,
27+
"port": int(os.getenv("PORT", 8000)),
28+
"host": os.getenv("HOST", "127.0.0.1"),
29+
}
30+
)
2331
server.register(
2432
root_agent,
2533
name="GitHub Issue Creator",
@@ -36,11 +44,20 @@ async def run():
3644
framework="BeeAI",
3745
variables=[
3846
EnvVar(name="GITHUB_REPOSITORY", description="The repository to create the issue in", required=True),
39-
EnvVar(name="GITHUB_PAT", description="The GitHub Personal Access Token to use for the API", required=True),
40-
47+
EnvVar(
48+
name="GITHUB_PAT", description="The GitHub Personal Access Token to use for the API", required=True
49+
),
4150
EnvVar(name="DOCS_URL", description="The URL of the documentation to use for the API", required=False),
42-
EnvVar(name="TEMPLATE_BUG_URL", description="The URL of the bug template to use for the API", required=False),
43-
EnvVar(name="TEMPLATE_FEATURE_URL", description="The URL of the feature template to use for the API", required=False),
51+
EnvVar(
52+
name="TEMPLATE_BUG_URL",
53+
description="The URL of the bug template to use for the API",
54+
required=False,
55+
),
56+
EnvVar(
57+
name="TEMPLATE_FEATURE_URL",
58+
description="The URL of the feature template to use for the API",
59+
required=False,
60+
),
4461
],
4562
),
4663
skills=[

0 commit comments

Comments
 (0)