From 80a09cf66ef3687d3e28d73d0d175b9c56c8bb27 Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Wed, 22 Oct 2025 12:20:52 -0400 Subject: [PATCH] web: dynamic ports redirect errors --- api/routes.py | 7 ++++++- docker-compose.example.yml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/routes.py b/api/routes.py index 207cea5..95830ba 100644 --- a/api/routes.py +++ b/api/routes.py @@ -1872,10 +1872,15 @@ def register_routes(app, dependencies: dict): @app.get("/") async def _core_info(): """Core container API information - Web interface on separate container""" + import os + # Get configured web port from environment or config + web_port = os.environ.get("WEB_EXTERNAL_PORT", + getattr(dependencies.get("config", None), "web_api_port", "8081")) + return { "service": "NFOGuard Core Processing Engine", "version": "2.7.0", - "message": "Web interface available on separate container (port 8081)", + "message": f"Web interface available on separate container (port {web_port})", "api_endpoints": { "health": "/health", "webhooks": "/webhook/*", diff --git a/docker-compose.example.yml b/docker-compose.example.yml index efa8e57..d1401d9 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -45,6 +45,7 @@ services: - TZ=${TZ:-America/New_York} - CORE_API_HOST=0.0.0.0 - CORE_API_PORT=8080 + - WEB_EXTERNAL_PORT=${WEB_API_PORT:-8081} # External port where web interface is accessible volumes: # Media paths (adjust to your setup) - /mnt/unionfs/Media/TV:/media/TV:ro