ci: keep docker bonjour setting automatic · openclaw/openclaw@6018f29
steipete
·
2026-04-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,9 +6,9 @@ services:
|
6 | 6 | TERM: xterm-256color |
7 | 7 | OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN:-} |
8 | 8 | OPENCLAW_ALLOW_INSECURE_PRIVATE_WS: ${OPENCLAW_ALLOW_INSECURE_PRIVATE_WS:-} |
9 | | -# Docker bridge networks usually do not carry mDNS multicast reliably. |
10 | | -# Set OPENCLAW_DISABLE_BONJOUR=0 only on host/macvlan/mDNS-capable networks. |
11 | | -OPENCLAW_DISABLE_BONJOUR: ${OPENCLAW_DISABLE_BONJOUR:-1} |
| 9 | +# Empty means auto: Bonjour disables itself in detected containers. |
| 10 | +# Set 0 only on host/macvlan/mDNS-capable networks; set 1 to force off. |
| 11 | +OPENCLAW_DISABLE_BONJOUR: ${OPENCLAW_DISABLE_BONJOUR:-} |
12 | 12 | # OpenTelemetry export is outbound OTLP/HTTP from the Gateway. Prometheus |
13 | 13 | # uses the existing authenticated Gateway route; it does not need a port. |
14 | 14 | OTEL_EXPORTER_OTLP_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT:-} |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -276,7 +276,7 @@ export OPENCLAW_WORKSPACE_DIR
|
276 | 276 | export OPENCLAW_GATEWAY_PORT="${OPENCLAW_GATEWAY_PORT:-18789}" |
277 | 277 | export OPENCLAW_BRIDGE_PORT="${OPENCLAW_BRIDGE_PORT:-18790}" |
278 | 278 | export OPENCLAW_GATEWAY_BIND="${OPENCLAW_GATEWAY_BIND:-lan}" |
279 | | -export OPENCLAW_DISABLE_BONJOUR="${OPENCLAW_DISABLE_BONJOUR:-1}" |
| 279 | +export OPENCLAW_DISABLE_BONJOUR="${OPENCLAW_DISABLE_BONJOUR:-}" |
280 | 280 | export OPENCLAW_IMAGE="$IMAGE_NAME" |
281 | 281 | export OPENCLAW_DOCKER_APT_PACKAGES="${OPENCLAW_DOCKER_APT_PACKAGES:-}" |
282 | 282 | export OPENCLAW_EXTENSIONS="${OPENCLAW_EXTENSIONS:-}" |
@@ -529,9 +529,11 @@ echo "Docker setup pins Gateway mode to local."
|
529 | 529 | echo "Gateway runtime bind comes from OPENCLAW_GATEWAY_BIND (default: lan)." |
530 | 530 | echo "Current runtime bind: $OPENCLAW_GATEWAY_BIND" |
531 | 531 | if is_truthy_value "$OPENCLAW_DISABLE_BONJOUR"; then |
532 | | -echo "Bonjour/mDNS advertising: disabled for Docker bridge networking (OPENCLAW_DISABLE_BONJOUR=$OPENCLAW_DISABLE_BONJOUR)." |
| 532 | +echo "Bonjour/mDNS advertising: force disabled (OPENCLAW_DISABLE_BONJOUR=$OPENCLAW_DISABLE_BONJOUR)." |
| 533 | +elif [[ -z "$OPENCLAW_DISABLE_BONJOUR" ]]; then |
| 534 | +echo "Bonjour/mDNS advertising: auto (disabled inside the Gateway container unless explicitly enabled)." |
533 | 535 | else |
534 | | -echo "Bonjour/mDNS advertising: enabled (OPENCLAW_DISABLE_BONJOUR=$OPENCLAW_DISABLE_BONJOUR)." |
| 536 | +echo "Bonjour/mDNS advertising: explicitly enabled (OPENCLAW_DISABLE_BONJOUR=$OPENCLAW_DISABLE_BONJOUR)." |
535 | 537 | fi |
536 | 538 | echo "Gateway token: $OPENCLAW_GATEWAY_TOKEN" |
537 | 539 | echo "Tailscale exposure: Off (use host-level tailnet/Tailscale setup separately)." |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -231,7 +231,7 @@ describe("scripts/docker/setup.sh", () => {
|
231 | 231 | expect(envFile).toContain("OPENCLAW_DOCKER_APT_PACKAGES=ffmpeg build-essential"); |
232 | 232 | expect(envFile).toContain("OPENCLAW_EXTRA_MOUNTS="); |
233 | 233 | expect(envFile).toContain("OPENCLAW_HOME_VOLUME=openclaw-home"); // pragma: allowlist secret |
234 | | -expect(envFile).toContain("OPENCLAW_DISABLE_BONJOUR=1"); |
| 234 | +expect(envFile).toContain("OPENCLAW_DISABLE_BONJOUR="); |
235 | 235 | const extraCompose = await readFile( |
236 | 236 | join(activeSandbox.rootDir, "docker-compose.extra.yml"), |
237 | 237 | "utf8", |
@@ -556,10 +556,10 @@ describe("scripts/docker/setup.sh", () => {
|
556 | 556 | expect(compose).toContain('"gateway"'); |
557 | 557 | }); |
558 | 558 | |
559 | | -it("keeps docker-compose gateway Bonjour advertising disabled by default", async () => { |
| 559 | +it("keeps docker-compose gateway Bonjour advertising in auto mode by default", async () => { |
560 | 560 | const compose = await readFile(join(repoRoot, "docker-compose.yml"), "utf8"); |
561 | 561 | expect( |
562 | | -compose.match(/OPENCLAW_DISABLE_BONJOUR: \$\{OPENCLAW_DISABLE_BONJOUR:-1\}/g), |
| 562 | +compose.match(/OPENCLAW_DISABLE_BONJOUR: \$\{OPENCLAW_DISABLE_BONJOUR:-\}/g), |
563 | 563 | ).toHaveLength(1); |
564 | 564 | }); |
565 | 565 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。