onlyoffice: drop legacy localhost:8988 URL fallback

The container always lives on the isolated oonet network at the fixed
IP; falling back to a published localhost port silently masked broken
setups with confusing 'not reachable at localhost:8988' diagnostics.
This commit is contained in:
2026-08-13 07:26:57 +00:00
parent 4103b8928c
commit 65e2fddf1a
+6 -10
View File
@@ -65,16 +65,12 @@ _httpx_client_loop: asyncio.AbstractEventLoop | None = None
def _get_onlyoffice_url() -> str:
if url := os.environ.get(
"ONLYOFFICE_URL", os.environ.get("ONLYOFFICE_CISTA_URL")
):
return url
# When the isolated network exists, the container is at its fixed IP and
# no localhost port is published (Docker discards ports on internal
# networks). Otherwise assume a legacy setup with a published port.
if _docker_network_gateway(OO_NETWORK):
return f"http://{OO_CONTAINER_IP}"
return "http://localhost:8988"
# The container runs on the isolated oonet network at a fixed IP; the
# host is the bridge gateway and reaches it directly, no published port.
return os.environ.get(
"ONLYOFFICE_URL",
os.environ.get("ONLYOFFICE_CISTA_URL", f"http://{OO_CONTAINER_IP}"),
)
def _get_jwt_secret() -> str: