Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
4faa026e
"...git@developer.sourcefind.cn:OpenDAS/openpcdet.git" did not exist on "a07572f389a00dadb859b7186471ef837e044278"
Unverified
Commit
4faa026e
authored
May 05, 2025
by
julienmancuso
Committed by
GitHub
May 05, 2025
Browse files
feat: allow to set http port (#931)
parent
67fc3b8c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
deploy/dynamo/sdk/src/dynamo/sdk/cli/serve_dynamo.py
deploy/dynamo/sdk/src/dynamo/sdk/cli/serve_dynamo.py
+4
-2
No files found.
deploy/dynamo/sdk/src/dynamo/sdk/cli/serve_dynamo.py
View file @
4faa026e
...
@@ -313,14 +313,16 @@ def main(
...
@@ -313,14 +313,16 @@ def main(
if
added_routes
:
if
added_routes
:
# Configure uvicorn with graceful shutdown
# Configure uvicorn with graceful shutdown
# get the port from PORT env var or use 8000 as default
port
=
int
(
os
.
environ
.
get
(
"PORT"
,
8000
))
config
=
uvicorn
.
Config
(
config
=
uvicorn
.
Config
(
service
.
app
,
host
=
"0.0.0.0"
,
port
=
8000
,
log_level
=
"info"
service
.
app
,
host
=
"0.0.0.0"
,
port
=
port
,
log_level
=
"info"
)
)
server
=
uvicorn
.
Server
(
config
)
server
=
uvicorn
.
Server
(
config
)
# Start the server with graceful shutdown handling
# Start the server with graceful shutdown handling
logger
.
info
(
logger
.
info
(
f
"Starting FastAPI server on 0.0.0.0:
8000
with routes:
{
added_routes
}
"
f
"Starting FastAPI server on 0.0.0.0:
{
port
}
with routes:
{
added_routes
}
"
)
)
server
.
run
()
server
.
run
()
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment