Avoid Kubernetes service environment collision
This commit is contained in:
parent
44f2b2608b
commit
2869c1030d
1 changed files with 3 additions and 1 deletions
|
|
@ -48,7 +48,9 @@ def create_application() -> PortalApplication:
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
host = os.environ.get("USER_ENGINE_HOST", "0.0.0.0")
|
host = os.environ.get("USER_ENGINE_HOST", "0.0.0.0")
|
||||||
port = int(os.environ.get("USER_ENGINE_PORT", "8080"))
|
# ``USER_ENGINE_PORT`` is reserved by Kubernetes service-link injection
|
||||||
|
# (for example ``tcp://10.43.0.1:8080``), so use an unambiguous setting.
|
||||||
|
port = int(os.environ.get("USER_ENGINE_HTTP_PORT", "8080"))
|
||||||
with make_server(host, port, create_application()) as server:
|
with make_server(host, port, create_application()) as server:
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue