diff --git a/__main__.py b/__main__.py index e54c4663..18dfdda1 100644 --- a/__main__.py +++ b/__main__.py @@ -1,4 +1,5 @@ import asyncio +import os import sys import signal from pathlib import Path @@ -41,8 +42,8 @@ def cleanup(): app = create_app() # Define host and port - host = "localhost" - port = 8443 + host = os.environ.get("PAIOS_HOST", "localhost") + port = int(os.environ.get("PAIOS_PORT", 8443)) # Log connection details logger.info(f"You can access pAI-OS at https://{host}:{port}.") diff --git a/backend/__main__.py b/backend/__main__.py index ec1d79f7..de38c7d9 100644 --- a/backend/__main__.py +++ b/backend/__main__.py @@ -1,3 +1,4 @@ +import os import sys import signal import asyncio @@ -42,8 +43,8 @@ def cleanup(): app = create_app() # Define host and port - host = "localhost" - port = 8443 + host = os.environ.get("PAIOS_HOST", "localhost") + port = int(os.environ.get("PAIOS_PORT", 8443)) # Log connection details logger.info(f"You can access pAI-OS at https://{host}:{port}.")