fix(extensions): bind community extension ports via ${BIND_ADDRESS}#1027
fix(extensions): bind community extension ports via ${BIND_ADDRESS}#1027yasinBursali wants to merge 1 commit intoLight-Heart-Labs:mainfrom
Conversation
|
Audit follow-up after today's merge wave: the original ordering blocker for this PR is now resolved, because #1044 has landed and the compose scanner accepts Current status: GitHub now reports this PR as conflicting ( |
Twenty-nine community extensions in resources/dev/extensions-library/ hardcoded `127.0.0.1:` on `ports:` entries, so setting BIND_ADDRESS=0.0.0.0 (via --lan flag, dashboard network-mode toggle, or .env) only exposed core services to the LAN. Community extensions remained loopback-only regardless of user intent. Rewrite 35 port-lines across 29 files to use the established pattern from PR Light-Heart-Labs#964: before: "127.0.0.1:${EXT_PORT:-NNNN}:NNNN" after: "${BIND_ADDRESS:-127.0.0.1}:${EXT_PORT:-NNNN}:NNNN" Default behaviour unchanged (loopback by default; user opt-in via BIND_ADDRESS=0.0.0.0 now works correctly). Healthcheck URLs inside `healthcheck:` blocks are intentionally preserved — those are container-internal loopback and should stay literal. Add tests/test-bind-address-sweep.sh to prevent regression, wired into the `test:` target of dream-server/Makefile (and inherited by `gate:` via `gate: lint test bats smoke simulate`).
8ca37c8 to
185f11e
Compare
|
Rebased on current
|
What
Replace hardcoded
127.0.0.1:port bindings in 29 community extension compose files with${BIND_ADDRESS:-127.0.0.1}:, matching the pattern established for core services. Wire a new regression test intomake test.Why
Community extensions in
resources/dev/extensions-library/services/hardcoded127.0.0.1:on everyports:entry. When users opted into LAN exposure via--lan, the dashboard network-mode toggle, orBIND_ADDRESS=0.0.0.0in.env, only core services responded to the setting. All 29 community extensions remained loopback-only, silently ignoring user intent.How
"127.0.0.1:${EXT_PORT:-NNNN}:NNNN"→"${BIND_ADDRESS:-127.0.0.1}:${EXT_PORT:-NNNN}:NNNN"test:URLs (container-internal loopback) intentionally preserved — they are not host-exposed bindings.dream-server/tests/test-bind-address-sweep.sh: greps all community extension compose files for bare127.0.0.1:port-line entries (bidirectional-verified: passes clean, fails clearly on revert).dream-server/Makefiletest:target; inherited bygate:viagate: lint test bats smoke simulate.Testing
docker compose -f <sample> configverified port-string substitution is correct; regression test (test-bind-address-sweep.sh) passes clean and fails with a clear message when a file is reverted;make -n testconfirms the new test is invoked by the target.BIND_ADDRESS=0.0.0.0in.env, rundocker compose config | grep "published"for a community extension (e.g. ollama) — confirm binding shows0.0.0.0not127.0.0.1. WithBIND_ADDRESSunset, confirm binding defaults back to127.0.0.1.Platform Impact
Known Considerations
Three services exposed on sensitive ports are worth user awareness when opting into LAN mode — default-loopback is preserved; these are user opt-in only:
No change to default behaviour; all three remain loopback-only unless the user explicitly sets
BIND_ADDRESS=0.0.0.0.