Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
- ${INFERIA_SSH_AUTHORIZED_KEYS_FILE:-./.ssh/authorized_keys}:/var/lib/inferia/ssh/authorized_keys:ro
ports:
- "${APP_PORT:-8000}:${APP_PORT:-8000}" # Unified web: /api gateway, /inf inference, /v2 OCI mirror, / dashboard
- "8080:8080" # Orchestration service internal port
- "127.0.0.1:8080:8080" # Orchestration, host only: the CLI uses it, nothing remote should
deploy:
resources:
limits:
Expand Down
9 changes: 9 additions & 0 deletions src/tests/deploy/test_compose_ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ def test_envoy_does_not_publish_its_admin_port():
ports = [str(p) for p in _service("front-envoy").get("ports", [])]
assert not any("9901" in p for p in ports), f"envoy admin published: {ports}"

def test_orchestration_port_is_published_to_the_host_only():
ports = [str(p) for p in _app_service().get("ports", [])]
published = [p for p in ports if p.split(":")[-1] == "8080"]
assert published, f"orchestration port no longer published: {ports}"
for p in published:
assert p.startswith("127.0.0.1:"), (
f"8080 must bind to localhost, some orchestration paths skip the internal key: {p}"
)

def test_app_does_not_hardcode_mirror_base():
env = _app_service().get("environment", [])
# environment may be a list ("K=V") or a dict; normalize to text and assert
Expand Down
Loading