Skip to content

Commit

Permalink
service: Add option to modify listen address
Browse files Browse the repository at this point in the history
Previously, uvicorn only listened on 127.0.0.1. This creates
problems, when running the service in docker.

We add a configuration option to modify the listen address via
the `config.ini`
  • Loading branch information
s-heppner committed Sep 11, 2024
1 parent 60608a7 commit f78f470
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.ini.default
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[SERVICE]
endpoint=http://127.0.0.1
LISTEN_ADDRESS=127.0.0.1
port=8125

[RESOLVER]
Expand Down
2 changes: 1 addition & 1 deletion semantic_id_resolver/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ def get_semantic_matching_service(
APP.include_router(
SEMANTIC_ID_RESOLVING_SERVICE.router
)
uvicorn.run(APP, host="127.0.0.1", port=int(config["SERVICE"]["PORT"]))
uvicorn.run(APP, host=config["SERVICE"]["LISTEN_ADDRESS"], port=int(config["SERVICE"]["PORT"]))

0 comments on commit f78f470

Please sign in to comment.