mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +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>
78 lines
3.5 KiB
Plaintext
78 lines
3.5 KiB
Plaintext
# Buzz production Docker Compose environment.
|
|
# Copy to .env and replace every CHANGE_ME value before running.
|
|
# The bootstrap script should generate this file for normal users.
|
|
|
|
# Image published by the public image pipeline. Use `:main` for pre-release testing. Pin `:sha-<7>` or a semver release tag for production.
|
|
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_MEDIA_BASE_URL=https://buzz.example.com/media
|
|
BUZZ_MEDIA_SERVER_DOMAIN=buzz.example.com
|
|
BUZZ_CORS_ORIGINS=https://buzz.example.com
|
|
|
|
# Production defaults. Closed relay mode requires RELAY_OWNER_PUBKEY and a stable relay key.
|
|
BUZZ_REQUIRE_AUTH_TOKEN=true
|
|
BUZZ_REQUIRE_RELAY_MEMBERSHIP=true
|
|
BUZZ_ALLOW_NIP_OA_AUTH=true
|
|
BUZZ_AUTO_MIGRATE=true
|
|
BUZZ_GIT_CONFORMANCE_PROBE=true
|
|
# Push stays disabled unless explicitly enabled. Keep the delivery endpoint
|
|
# explicit so enabling it never depends on an in-code deployment fallback.
|
|
BUZZ_PUSH_ENABLED=false
|
|
BUZZ_PUSH_GATEWAY_DELIVERY_URL=https://push.buzz.xyz/v1/deliveries/apns
|
|
RUST_LOG=buzz_relay=info,buzz_db=info,buzz_auth=info,buzz_pubsub=info,tower_http=info
|
|
|
|
# Owner identity. Set to a 64-character hex Nostr pubkey.
|
|
RELAY_OWNER_PUBKEY=CHANGE_ME_OWNER_PUBKEY_HEX
|
|
|
|
# Stable secrets. Generate once, keep in .env, and back up securely.
|
|
BUZZ_RELAY_PRIVATE_KEY=CHANGE_ME_64_HEX_PRIVATE_KEY
|
|
BUZZ_GIT_HOOK_HMAC_SECRET=CHANGE_ME_RANDOM_64_HEX
|
|
POSTGRES_DB=buzz
|
|
POSTGRES_USER=buzz
|
|
POSTGRES_PASSWORD=CHANGE_ME_RANDOM_PASSWORD
|
|
REDIS_PASSWORD=CHANGE_ME_RANDOM_PASSWORD
|
|
BUZZ_S3_ACCESS_KEY=CHANGE_ME_RANDOM_ACCESS_KEY
|
|
BUZZ_S3_SECRET_KEY=CHANGE_ME_RANDOM_SECRET_KEY
|
|
BUZZ_S3_BUCKET=buzz-media
|
|
# Bundled MinIO uses path-style URLs; deploy/compose/compose.yml pins this.
|
|
BUZZ_S3_ADDRESSING_STYLE=path
|
|
|
|
# Optional private moderation dashboard. Set BUZZ_ADMIN_HOST plus BUZZ_ADMIN_AUTH:
|
|
# BUZZ_ADMIN_AUTH=nip98 (default) — NIP-98 HTTP Auth via Nostr pubkey-based auth.
|
|
# Authorized principals resolve from RELAY_OPERATOR_PUBKEYS (config Operators),
|
|
# RELAY_OWNER_PUBKEY (implicit Operator fallback when operator list is empty),
|
|
# and the relay_operators table (DB-managed Operator/Moderator roster).
|
|
# Dashboard requires a NIP-07 browser extension (nos2x or Alby).
|
|
# BUZZ_ADMIN_AUTH=disabled — no auth. Use only behind a VPN or private ingress.
|
|
# Relay logs a WARN on boot.
|
|
# Token authentication was removed: BUZZ_ADMIN_TOKEN is ignored with a startup
|
|
# warning — remove it from the environment.
|
|
# Any unrecognised BUZZ_ADMIN_AUTH value aborts startup.
|
|
# When BUZZ_ADMIN_HOST is set, the relay advertises the admin origin in its NIP-11
|
|
# document (`admin_api` field) so clients auto-discover the console without manual entry.
|
|
# Setting RELAY_OPERATOR_PUBKEYS for the console does NOT require RELAY_OPERATOR_API_ORIGIN;
|
|
# that origin is only for community provisioning (POST /operator/communities), which fails
|
|
# closed at request time until it is set (the relay boots with a WARN in the meantime).
|
|
# BUZZ_ADMIN_HOST=admin.buzz.example.com
|
|
# BUZZ_ADMIN_AUTH=nip98
|
|
# RELAY_OPERATOR_PUBKEYS=<64-char hex pubkey>[,<64-char hex pubkey>...]
|
|
# RELAY_OPERATOR_API_ORIGIN=https://admin.buzz.example.com
|
|
|
|
# Optional host ports. Base compose publishes the relay directly on BUZZ_HTTP_PORT.
|
|
BUZZ_HTTP_PORT=3000
|
|
|
|
# Caddy host ports. Only used with compose.caddy.yml.
|
|
CADDY_HTTP_PORT=80
|
|
CADDY_HTTPS_PORT=443
|
|
|
|
# Dev override ports. Only used with compose.dev.yml.
|
|
POSTGRES_PORT=5432
|
|
REDIS_PORT=6379
|
|
MINIO_API_PORT=9000
|
|
MINIO_CONSOLE_PORT=9001
|
|
ADMINER_PORT=8082
|
|
PROMETHEUS_PORT=9090
|