Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions deploy/compose/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ BUZZ_MEDIA_BASE_URL=https://buzz.example.com/media
BUZZ_MEDIA_SERVER_DOMAIN=buzz.example.com
BUZZ_CORS_ORIGINS=https://buzz.example.com

# Optional NIP-AB pairing sidecar. Start it with `--profile pairing`, then
# expose only its `/pair` route through a TLS reverse proxy. Never advertise
# this URL before the sidecar and proxy route are healthy.
# BUZZ_PAIRING_RELAY_URL=wss://buzz.example.com/pair

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route the advertised /pair URL to the sidecar

When an operator enables this suggested URL with the bundled TLS flow (BUZZ_COMPOSE_TLS=true), deploy/compose/Caddyfile still sends every request—including /pair—to relay:3000, while the new sidecar is only published on a loopback host port. Consequently NIP-11 advertises a pairing URL that never reaches pairing-relay, so mobile pairing continues to fail; add a Caddy /pair matcher that proxies to pairing-relay:5000 before the catch-all relay route.

Useful? React with 👍 / 👎.

BUZZ_PAIR_RELAY_PORT=5000

# Production defaults. Closed relay mode requires RELAY_OWNER_PUBKEY and a stable relay key.
BUZZ_REQUIRE_AUTH_TOKEN=true
BUZZ_REQUIRE_RELAY_MEMBERSHIP=true
Expand Down
15 changes: 15 additions & 0 deletions deploy/compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ services:
networks:
- buzz-net

# Optional stateless NIP-AB transport for pairing a device that is not yet a
# relay member. The host port is loopback-only; a TLS reverse proxy must
# expose only /pair. Enable explicitly with `--profile pairing`.
pairing-relay:
profiles: ["pairing"]
image: ${BUZZ_IMAGE:-ghcr.io/block/buzz:main}
entrypoint: ["/usr/local/bin/buzz-pair-relay"]
environment:
BUZZ_PAIR_RELAY_BIND_ADDR: 0.0.0.0:5000
ports:
- "127.0.0.1:${BUZZ_PAIR_RELAY_PORT:-5000}:5000"
restart: unless-stopped
networks:
- buzz-net

postgres:
image: postgres:17-alpine
environment:
Expand Down