fix(run): resolve service IP from container address, not network gateway#100
Merged
Conversation
Environment values matching a service name are substituted with that service's IP, but getIPForRunningService returned the attachment's ipv4Gateway — the same gateway for every container on the network — so e.g. DATABASE_HOST=db pointed at the gateway instead of the db container and dependents waited for the database forever. Use the attachment's own ipv4Address instead.
Mcrich23
approved these changes
Jun 7, 2026
Cyb3rDudu
added a commit
to Cyb3rDudu/Container-Compose
that referenced
this pull request
Jun 30, 2026
Resolve ComposeUp.swift conflicts: - getIPForRunningService: keep containerName(for:) helper, retain main's container-address comment (Mcrich23#100). - waitUntilServiceIsRunning: adopt main's ActivityClock idle/maxWait signature (Mcrich23#112); keep containerName(for:) helper in place of the silent guard-let-projectName return. - configService: keep BOTH Mcrich23#97's --dns-domain args and main's compose project/service labels (Mcrich23#110) — independent features at the same site. - Failed-wait teardown: call stopExistingContainers([containerName]) (Mcrich23#97 rename) instead of main's stopOldStuff([serviceName]); pass the actual launched name so dotted/explicit names are torn down correctly. Builds clean; 63 static tests pass (DNS helpers, parsing, volumes, helpers). Co-Authored-By: Claude <noreply@anthropic.com>
Cyb3rDudu
added a commit
to Cyb3rDudu/Container-Compose
that referenced
this pull request
Jun 30, 2026
Resolve ComposeUp.swift conflicts: - getIPForRunningService: keep containerName(for:) helper, retain main's container-address comment (Mcrich23#100). - waitUntilServiceIsRunning: adopt main's ActivityClock idle/maxWait signature (Mcrich23#112); keep containerName(for:) helper in place of the silent guard-let-projectName return. - configService: keep BOTH Mcrich23#97's --dns-domain args and main's compose project/service labels (Mcrich23#110) — independent features at the same site. - Failed-wait teardown: call stopExistingContainers([containerName]) (Mcrich23#97 rename) instead of main's stopOldStuff([serviceName]); pass the actual launched name so dotted/explicit names are torn down correctly. Builds clean; 63 static tests pass (DNS helpers, parsing, volumes, helpers).
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.
Environment values matching a service name are substituted with that service's IP, but getIPForRunningService returned the attachment's ipv4Gateway — the same gateway for every container on the network — so e.g. DATABASE_HOST=db pointed at the gateway instead of the db container and dependents waited for the database forever. Use the attachment's own ipv4Address instead.