Fix broken default compose: revert to single service + add host-mode overlay - #16
Merged
Merged
Conversation
PR #15's compose-profiles approach broke `docker compose up -d`: putting profiles=["", "bridge"] on the default service made the empty-string profile NOT match no-profile invocations, so the user got no logs after running their normal commands. Cleaner pattern: docker-compose.yml stays single-service (default bridge, identical to pre-#15 behaviour), and docker-compose.host.yml is an override layered on top via -f when the operator needs host networking for ICE. docker compose up -d # bridge docker compose -f docker-compose.yml \ -f docker-compose.host.yml up -d # host The overlay uses Compose v2's `!reset null` to drop the bridge attachment, the ts6-net network section, and the port mapping; then `network_mode: host` puts the bot in the host namespace. ruff + 219 tests still green. https://claude.ai/code/session_016DuCjRJK995Tj9aDhhB9at
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.
Why
PR #15 broke the default
docker compose up -dworkflow: I putprofiles: ["", "bridge"]on the bot service thinking the empty-string profile would match "no profile flag", but in Compose semantics it's just an explicit profile named"". So plaindocker compose up -dactivated nothing → no logs, no service, user had to ask "wo sind meine logs".Fix
Roll back to a single-service
docker-compose.yml(identical to pre-#15 behaviour). For host-network mode, layer adocker-compose.host.ymloverlay via-f:The overlay uses Compose v2's
!reset nullto drop the bridge attachment, thets6-netnetwork section, and the127.0.0.1:8080port mapping; thennetwork_mode: hostjoins the host namespace.Test plan
ruff check src tests— cleanpytest— 219 passeddocker compose up -dworks again (gets logs).docker compose -f docker-compose.yml -f docker-compose.host.yml up -dputs the bot in host net mode (ICE then has real LAN/WAN candidates).Operator commands (recovery)
When you're ready to try host networking:
# .env: TS6_HOST=127.0.0.1 (oder Host-IP, weil "teamspeak-server" nur im docker-Netz auflöst) nano .env docker compose down docker compose -f docker-compose.yml -f docker-compose.host.yml up -d docker compose logs -fhttps://claude.ai/code/session_016DuCjRJK995Tj9aDhhB9at
Generated by Claude Code