chore(compose): map host.internal to the host gateway for local dev - #49
Merged
Merged
Conversation
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.
Summary
Local development only. Adds one stable hostname,
host.internal, that resolves tothe machine running Docker from both inside the bot container and on the host
itself, so compose runs can reach services the developer runs locally — object
storage, Mongo, Redis, the backend.
The concrete failure it fixes: uploads die in local compose runs. The backend signs
presigned upload URLs with an address reachable from the developer's machine
(
127.0.0.1:9000), but inside the container that is the container itself, so the PUTis refused —
Retry part 1three times, thenFailed to upload part 1 after 3 attempts.SigV4 signs theHostheader, so signer and uploader must use oneidentical name; the backend cannot sign
127.0.0.1and hand the containerhost.docker.internal..internalis ICANN-reserved for private use, and the name is service-neutral so thesame entry serves storage, databases and the API rather than needing one alias each.
Changes
docker-compose.yml—extra_hosts: ["host.internal:host-gateway"]on themeeting-botservicepackage.json— 1.2.34 → 1.2.35Test plan
127.0.0.1 host.internalto the host machine's hosts file, and point thebackend's S3 endpoint at
http://host.internal:9000.docker compose up, then run a bot job against a real meeting.No runtime effect when unused: an
extra_hostsentry for a hostname nothingreferences does nothing.