Skip to content

Fix broken default compose: revert to single service + add host-mode overlay - #16

Merged
queueeee merged 1 commit into
mainfrom
claude/review-claude-md-iOuUt
May 1, 2026
Merged

queueeee merged 1 commit into
mainfrom
claude/review-claude-md-iOuUt

Conversation

@queueeee

@queueeee queueeee commented May 1, 2026

Copy link
Copy Markdown
Owner

Why

PR #15 broke the default docker compose up -d workflow: I put profiles: ["", "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 plain docker compose up -d activated 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 a docker-compose.host.yml overlay via -f:

# Default bridge (original behaviour, unchanged)
docker compose up -d

# Host networking (works around docker-bridge ICE failures)
docker compose -f docker-compose.yml -f docker-compose.host.yml up -d

The overlay uses Compose v2's !reset null to drop the bridge attachment, the ts6-net network section, and the 127.0.0.1:8080 port mapping; then network_mode: host joins the host namespace.

Test plan

  • ruff check src tests — clean
  • pytest — 219 passed
  • Live: plain docker compose up -d works again (gets logs).
  • Live: docker compose -f docker-compose.yml -f docker-compose.host.yml up -d puts the bot in host net mode (ICE then has real LAN/WAN candidates).

Operator commands (recovery)

cd /opt/ts6-stream-bot
git pull
docker compose down
docker compose up -d                          # back to logging working
docker compose logs -f

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 -f

https://claude.ai/code/session_016DuCjRJK995Tj9aDhhB9at


Generated by Claude Code

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
@queueeee
queueeee merged commit 56ae04a into main May 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants