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
1 change: 1 addition & 0 deletions deploy/compose/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BUZZ_IMAGE=ghcr.io/block/buzz:main
# Public host name. Used by compose.caddy.yml and URL-derived settings below.
BUZZ_DOMAIN=buzz.example.com
RELAY_URL=wss://buzz.example.com
BUZZ_PAIRING_RELAY_URL=wss://buzz.example.com/pair
BUZZ_MEDIA_BASE_URL=https://buzz.example.com/media
BUZZ_MEDIA_SERVER_DOMAIN=buzz.example.com
BUZZ_CORS_ORIGINS=https://buzz.example.com
Expand Down
8 changes: 7 additions & 1 deletion deploy/compose/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{$BUZZ_DOMAIN} {
encode zstd gzip

reverse_proxy relay:3000
handle /pair {
reverse_proxy pairing-relay:5000
}

handle {
reverse_proxy relay:3000
}
}
4 changes: 4 additions & 0 deletions deploy/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This is the single-node/VPS deployment bundle. It is intentionally separate from
the root `docker-compose.yml`, which remains local development infrastructure.

The bundle also runs the stateless `buzz-pair-relay` sidecar. Caddy routes only
`/pair` to that service, and `BUZZ_PAIRING_RELAY_URL` advertises the public
WebSocket URL to desktop and mobile clients.

## Quick start

```bash
Expand Down
2 changes: 2 additions & 0 deletions deploy/compose/compose.caddy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ services:
depends_on:
relay:
condition: service_healthy
pairing-relay:
condition: service_healthy
environment:
BUZZ_DOMAIN: ${BUZZ_DOMAIN:?set BUZZ_DOMAIN}
ports:
Expand Down
15 changes: 15 additions & 0 deletions deploy/compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ services:
networks:
- buzz-net

pairing-relay:
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
healthcheck:
test: ["CMD-SHELL", "bash -ec 'exec 3<>/dev/tcp/127.0.0.1/5000'"]
interval: 10s
timeout: 3s
retries: 12
start_period: 5s
restart: unless-stopped
networks:
- buzz-net

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