mirror of
https://github.com/block/buzz.git
synced 2026-10-27 20:41:57 +00:00
Make the push gateway origin configurable across the relay, gateway, mobile client, and deployment chart. This is a fresh deployment. The gateway has only run on personal development infrastructure, and push has no existing enabled users. Legacy migration, configured-to-unconfigured mobile transitions, and rolling upgrades from pre-launch gateway binaries are not supported. Populated pre-launch databases are rejected with an informative error before migrations run; their data is untouched. Mobile builds may omit the gateway URL, leaving push unavailable. Once push is enabled, subsequent builds must retain that configuration. ### Validation - All applicable CI checks pass at `5f546cfaf403f0386f146d213adfb4392f4ec29c`, including Rust, mobile/Swift, desktop/integration, security, image builds, and Helm checks. An unrelated agent cancellation test passed on retry. - PostgreSQL CI passed 384 tests, including the production-entry-point regression for refusing populated pre-launch databases before migrations, fresh initialization, and subsequent initialized deployments. - Focused local validation passed all 10 gateway PostgreSQL tests under the CI discovery filter and all 3 unconfigured-mobile tests. Repository-wide PostgreSQL discovery validation and the complete pre-push hooks passed. - Physical-device APNs/App Attest behavior and deployment to a live cluster were not verified in this work. --------- Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: Codex <noreply@openai.com>
66 lines
2.5 KiB
Markdown
66 lines
2.5 KiB
Markdown
# Buzz Docker Compose deployment
|
|
|
|
This is the single-node/VPS deployment bundle. It is intentionally separate from
|
|
the root `docker-compose.yml`, which remains local development infrastructure.
|
|
|
|
## Quick start
|
|
|
|
```bash
|
|
cd deploy/compose
|
|
cp .env.example .env
|
|
$EDITOR .env # replace every CHANGE_ME value
|
|
./run.sh start
|
|
```
|
|
|
|
For a public VPS with automatic Let's Encrypt certificates:
|
|
|
|
```bash
|
|
cd deploy/compose
|
|
BUZZ_COMPOSE_TLS=true ./run.sh start
|
|
```
|
|
|
|
The bootstrap script should eventually replace manual `.env` editing for normal
|
|
users. It is responsible for generating stable secrets and, optionally, an owner
|
|
keypair.
|
|
|
|
## Production notes
|
|
|
|
- Requires Docker Compose v2.24.4 or newer; the TLS override uses Compose's
|
|
`!reset` tag to remove the direct relay port when Caddy terminates HTTPS.
|
|
- Default `BUZZ_IMAGE` tracks `ghcr.io/block/buzz:main` for early testing. Pin it to `ghcr.io/block/buzz:sha-<7>` or a semver release tag for production once available.
|
|
- Keep `BUZZ_RELAY_PRIVATE_KEY`, `BUZZ_GIT_HOOK_HMAC_SECRET`, database/Redis,
|
|
and S3 secrets stable across restarts.
|
|
- `RELAY_OWNER_PUBKEY` is intentionally not prefixed with `BUZZ_`; it must be a
|
|
64-character hex Nostr pubkey when closed relay mode is enabled.
|
|
- `BUZZ_AUTO_MIGRATE` is opt-in. Set `BUZZ_AUTO_MIGRATE=true` or run
|
|
`buzz-admin migrate` before starting the relay when bootstrapping a fresh
|
|
database. Auto-migration requires an image that includes embedded SQLx
|
|
migrations.
|
|
- The stack uses Postgres, Redis, MinIO, and a git data volume because
|
|
those are real Buzz dependencies today. Minimal mode can simplify this later.
|
|
- Mobile push remains off by default. To use the public gateway, keep the
|
|
template's explicit `BUZZ_PUSH_GATEWAY_DELIVERY_URL` and set
|
|
`BUZZ_PUSH_ENABLED=true`. To use another gateway, replace the exact HTTPS
|
|
`/v1/deliveries/apns` URL before enabling push.
|
|
- The bundled Compose stack fixes the relay endpoint to `http://minio:9000` and
|
|
`BUZZ_S3_ADDRESSING_STYLE=path`: Docker DNS resolves `minio`, not
|
|
`<bucket>.minio`. It is not configurable for an external S3 provider through
|
|
`.env`; use the Helm chart or a custom Compose configuration for providers
|
|
such as new Railway Storage Buckets that require `virtual` addressing.
|
|
|
|
Run `./run.sh backup-hint` for the backup checklist.
|
|
|
|
## Validation
|
|
|
|
Before sharing an install link publicly, verify a fresh install with:
|
|
|
|
```bash
|
|
cd deploy/compose
|
|
cp .env.example .env
|
|
$EDITOR .env
|
|
./run.sh config
|
|
./run.sh start
|
|
curl -fsS "http://127.0.0.1:$(grep -E '^BUZZ_HTTP_PORT=' .env | cut -d= -f2-)/_liveness"
|
|
./run.sh status
|
|
```
|