Repository navigation
fix: configurable bind address so Docker port mapping works (loopback by default) - #9
Merged
Merged
Conversation
… by default Servers read BIND_ADDRESS (or HOST), default 127.0.0.1. Dockerfiles set BIND_ADDRESS=0.0.0.0; compose keeps publishing on 127.0.0.1 only. Startup warns loudly on a non-loopback bind without ADMIN_TOKEN. slack POST /api/slack/send requires ADMIN_TOKEN. Versions: slack 0.1.3, email 0.1.3, discord 0.1.2, whatsapp 0.1.2, google-chat 0.1.2. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every gateway bound its Express server to
127.0.0.1. Inside a container that is the container's own loopback, so a published port never connected.Change
BIND_ADDRESS(orHOST;BIND_ADDRESSwins), default127.0.0.1. Non-container runs are unchanged. The helper issrc/bind-address.tsin each package (resolve, loopback check, URL formatting, warning text).ENV BIND_ADDRESS=0.0.0.0(container only).docker-compose.ymlalready published127.0.0.1:PORT:PORT, so it is unchanged and the host side stays loopback-only. No Dockerfile or compose health check existed, so none needed changing.ADMIN_TOKENunset logs a loud[SECURITY WARNING]at startup. It does not stop the process.ADMIN_TOKEN. slackPOST /api/slack/senddid not, so it now returns 403 when the token is unset (behaviour change: setADMIN_TOKENto keep using it). google-chat and whatsapp have no write routes..env.examplefiles and CHANGELOG updated. Versions: slack 0.1.3, email 0.1.3, discord 0.1.2, whatsapp 0.1.2, google-chat 0.1.2.Tested
tsc --noEmitin all 5 packages: clean. Rootnpm run lint: 0 errors (63 existing warnings).npm test: discord 42, slack 37, email 17, google-chat 27, all passing (newbind-address.test.tsin each). whatsapp has no test setup.-p 127.0.0.1:3021:3021and a dummy AMP key:/healthreturned 200 from the host,/api/activityreturned 401 without a token and 200 with it, the host's LAN IP on that port did not connect, the no-token run printed the warning, andBIND_ADDRESS=127.0.0.1in the container reproduced the old failure (empty reply).Not tested
docker compose upas a whole.🤖 Generated with Claude Code